refactor form submission logic
refactor form submission logic to better handle asynchronous backend processes