Fix CanCan excepiton redirect error, and add support for index