fix auth bug