moved registration form processing to its own file