Added logging to Ajax