Save users and passwords in database

Use CouchDB instead of arrays in memory
to remember users and passwords.
Refactor: Database: Put views in own file
Refactor: Move encrypt lib into own file
Refactor: Move couch access methods to own file

Move the code that interacts directly with CouchDB
into its own module.