session timeouts on ajax calls were not detected properly