fixed auth bugs