Fix bugs related to authen