How to redirect to main page after form submission