Update: JavaScript and server

connected messages with backend to pass messages to other users.