I am trying to prevent a user from clicking the login button on my site multiple times (which is creating multiple sessions). Yes I can disable the form button with javascript when the user clicks the login button, but the problem is when a user clicks the back button in the browser to go back to the form from the page that processes the form/errors, the button is still disabled and the page needs to be refreshed. My question is how can I disable the button, but still enable the button when the user uses the back button in the browser.
Many thanks!