Fixed conditional redirect

This is for login and signup