Provide ajax headers, fix id bug

"id" is no longer hard-coded as the identifier field. ajaxHeaders can now be provided through config, supporting authentication better.