move db access / auth functions into multilevel client call