Fix Authentication Bugs.
Fix Authentication Bugs.