Update Javascript client for websocket