Basic db access.
Add user functions, fix get hash.