refactor repository, add code to activate user account