refactor do everything on page ready
Authenticate user on send and close connection, add username in front of messages