login failure redirect bug fix