Implemented the messages servlet to send and receive messages.