tests: Add authentication tests

Test that authentication works in basic and corner cases.  Fix up a few
inconsistencies found by the test cases.

Signed-off-by: Adam Litke <agl@linux.vnet.ibm.com>