Making an ajax call to the websocket chatserver to keep the user connected