Added message logging and some chat functionality