replaced generateRegistrationForm function with a view