add user register and login functions