login redirect bugfix