Moved the ajax impersonation code to BaseWebApp.js