initial database interface
improve database interface

* add Doxygen comments
* add input validation
* add unit tests
add error template
add adduser web service
require unique usernames