refactored code and tests. onNewUserEnter() added