better handling of errors, and disable the submit button while
submitting a post