Fix login redirect issue