Added chat class on server side