updated to help users with switching identity

There was a bug where a user would be stuck in an infinite loop