Fixed an error when trying to logout in two tabs