fix auth failure bug