Added login redirect support.