checkAuth function simplified as the authentication is done in the Auth class now.