Fixed an issue where an error was thrown after logout