Redirect works now with ajax! Uses ajax to display error messages on the same page, and also redirects to the home page when user makes a page successfully