Prevent "Confirm Form Resubmission" when pressing back button after incorrect login

I am using Yii 2 Advanced and when I type incorrect login details, I get “Incorrect login details” alert message. But when I click back button, I get " Confirm Form Resubmission" box in chrome. How can I prevent ? I want to show same error message when user goes back.

When you get the message, after user click the alert redirect to the same page to clear stuffs.
But why is that a problem? If user needs to go to some page then after alert redirect to that page