Fixed auth bugs