Login and person creation logic