Correctly routes error messages to callbacks
Emits error event and disconnects on failed handshake
Merge pull request #19 from xavi-js/regression/disconnect-on-failed-handshake

Client should disconnect on failed handshake