Add deeper unit tests to authentication path