Added more form validation. Also added and fixed redirecting between pages.