designed the flow of the registration and login