Repeat email v1

Also adds some badly needed testing infrastructure.
There should probably be more tests that include `test_duplicate_username, test_mismatched_passwords`. It might be worth waiting for #78 to be merged to then rebase and make sure every case is covered from that if/elif/else statement in the new registration method.