Websocket client written in Javascript