Add unit tests

This PR adds unit tests for each AuthType as well as a null authentication test.

I also cleaned up some of the regexes used to match emails and passwords.

re #3