connect to websocket based on window.location