Fix Authentication Bugs.