implementation and tests for UserManager/