add change to prevent messages from appearing in the screen after logout