add logout callback on beforeunload
handle the PeerID-already-in-use error and display a friendly message
Merge pull request #392 from yemel/fix/handle-sudden-disconnection

Fix/handle sudden disconnection