validate cookie before ajax
1