Registration backend

Initial registration code.