Handle POST ajax queries properly as a form submission