Now using email address for user usernames.  Also lots of general cleanup and refactoring.
Refactored and cleaned up database stuff