refactoring index and users.js