added test cases to registration unit test

added test case for credentials registration step.  figured out how to
mock jquery ajax calls.