Basic ajax auth helper.