add jquery pjax support
fix the handling of unauthorized access