chat login/logout fix