switch all existing ajax to socket.io