add index controller and hateos support.