Create account / login use actual DB.

Lots and lots of refactoring.