added mock repo for users. refactoring of controller