Fixed a authentication bug