Added an auth solution for websockets

Until we figure out how to intercept the HTTP get request that is upgraded into a websocket, we will be using a token-based system to indicate that a websocket can be trusted. Anyone can open a websocket with the server with this approach, but only authenticated users will be able to get a token allowing them to use it.
Yes. Both indicate someone breaking the protocol we've set up by sending or omitting invalid data.

Honestly, the error codes are very abstract and not that useful. This was the best I could find, though Yoav also suggested 1011 for unexpected exception.