Added logging.
Added AJAX call.