Refactor code that renders user list