Test the logout functionality.