Adapted user management model and service. Refactoring of database related security code.