Fixed two login bugs where the user could reach a two different states that should not occur.