add user register and login logic