Fix login/reg loop issues

It's no longer possible to get stuck in a loop with registration and
login if you fail to create an account or enter an incorrect password.