Fix some auth bugs