Improved registration flow in the API