Corrected the logout logic in the headers.