Fix auth bugs.