title: Codeigniter csrf expired token
body: <p>In my codeigniter ajax application, if a user's session has timed out and they submit an ajax form, since the csrf token has expired, the server returns a 500 error... how do I have the server return a 401 error instead so I can at least process the error and redirect the user to the login form?</p>