Refactoring the authenticate method some.

No more tuple, and slightly cleaner.