changed websocket to use window.location.host and pathname