Make return type of authenticate more consistent

The original return types were inconsistent. This change makes them more consistent.

You can still use the return from authenticate in an if statement.