Changed ajax url calls for adding courses based on endpoint name change

Fixed arguments for addContact ajax url call
Added additional debug info for failed ajax calls