Fix auth bugs