completes form validation, error handliing, and redirect