fix auth related, test related some bugs