Adding logout functionality.