ticket:1. Introducing UserManager class (tests + code); some refactoring and code cleanup