fix for ajax requests not containing csrf token

adds some javascript (using jquery) that adds the csrf token to ajax requests