db and user tests, closes #3 closes #9 closes #1