Make return type of authenticate more consistent