Adding security check to ajax function.
Merge pull request #14 from methnen/ajax-security

Adding security check to ajax function.