fix auth check