logout handling for ajax - at work