Pre-authentication checks to avoid SQL queries.

Reducing SQL queries could speed things up a little