fix login error redirect