You can get stuck in a loop if you have multiple accounts such as a dev and production account.
So if you're in stuck in the dev account and need to log into production you get stuck in a loop of it trying to login as the dev account.
The only way out is to find a dev site and log out from the dev account.