Fixed auth bugs.