Use json for data transferred between server and client.
The server now sends the messages to all connected clients."
Added login functionality.