use websocket for all communication instead of ajax