fixed auth bug