Added user registration login logic.