re-implement the registration flow.