Fixes for the user management system, issue #147