added getProfile and getIndex methods in UsersController.