Redirect (HTTP 302) during load is not respected

During a loadXML() the server complains the session has expired, instead of the login page being displayed, an alert() displays the raw HTML. Not good, very annoying.

See longer description here: viewtopic.php?f=19&t=50411

DHTMLX will not redirect the main page if code 302 was received for any of ajax calls
it is common behavior for all AJAX libs