Query now caches query strings as prepared statements
improve auth tests