handle secure websocket connection in the example client