Separate registration code from auth code