Refactor registration flow
Refactor into routes