add a 401 test to app_test
refactor database
fix dao metrics
cleanup dualdao service method creation