Handle expired sessions

If the current login session expires after rendering the web page,
route erroring out AJAX calls to go to login.