fixed asyncSubmit function that was having an issue with csrf