Merge pull request #1 from retrogradeorbit/master

Some small changes
tidying ImapDb and making error handling more consistent.
Merged Crispin's changes.
AJAX login flow set up. Do a  to get the mustache dependency.
Installation script update.
Install file tweak.
Signin actually working now. Error handling needs work - should be more abstract at the lowest level.