Fixed logic for directing of login and signup pages