Implemented global AJAX error handler and also changed the filter to redirect if a non-AJAX request is made