working authentication and chat