added function to add CSRF token to ajax requests