Added chat library for all of the chat methods

Server side logic