Chat functionality implemented on the front page and chat page