added user index logic in controller