Updated "on error" redirect

Now redirecting password-related errors to the main page.