Fix auth check.