Fix login redirect error.