first commit: complete the register controller(front + back)