Fix login issue where user was nil when determining redirect