plugging in api registration to the registration form