Separate registration logic into own component.