User Registration code and accompanying tests.