Increase the handshake timeout from 10 seconds to 60 seconds.

This is because users are typing their name in this time window. 10 seconds
seems a bit harsh.
Fix WebSocket connection stopping connection immediately.

I made a mistake in the denial-of-service protection part in WebSocket traffic
handling. The fix is trivial.
Some indentation fixes.
Implement a login box. It works!