solving an issue with the construction of the url used for websocket connection