Added websocket support. Slightly hacky at the moment