Fix auth check