Tweaks to help with SessionAuthentication and AJAX API calls