Websocket test for chrome and firefox and handle invalid first JSON response