basesql extract retries default unlimited; distinct returns resulting list sorted; fixed auth a bit; updated logging