add csrf token check and form check for some post methods