Added more functionality to the chat servlet.