Cleaned up auth method.