Fallback to other modes if websocket is not supported

Implemented through `sockjs` instead of direct websocket connections.