Fixed some probleme bugs of auth system