#326 Refactoring 500 Error in MainController (When Session end, Did not
redirect And Throw Exception before)