Integrated the registration and login flow with webservice