before ajax auth