Fix bugs related to old auth method.