initial login and registration flow working with the api