Add Register function.