400 Bad Request error shown after submitting form