add registerUser login logic