Starting work on user management. Refactored classes that should have
been common to a different package.