Bug fix for login redirect.