fixed disconnect(), added handshake callback