added forgery protection to API