added logic for work with users