This post describes how to configure Exchange 2013 OWA to have IM integration to Lync 2013. Here I would like to give some troubleshooting tips in case you can't get the integration to work.
OwaVirtualDirectory and OwaMailboxPolicy
Lync 2013 Topology
Logfile and tracing