simplify websocket connect
some debug messages
added test for connect+register failure, reference https://github.com/Worlize/WebSocket-Node/issues/91 and sockethub issue #90