Fixed serialization/deserialization bugs.
Implemented IPEndpoint for WebSockets (needed for login).
Converted tabs into spaces.