fix for ajax vs non-ajax reqs + more logging