[WIP] Complete implementation of websockets on the server

Modify existing code for websockets on the server to handle new requests/responses from the client.
Yeah, this looks really fishy. I think you made mistake removing it from line 22.