Implemented adaptive websocket URIs that correctly use wss:// when SSL is enabled