Added submit method to registerController