fix auth query