Added validation and old input on error redirects to the login and sign up form.