improved handling of failed logins with redirect to same page