added ability to send chat messages to server