Thanks for reporting this Going back to same page does not make any sense in case of success and has never been so if I remember correctly.
Joomla comes back to same page on wrong credentials, and redirects to login page with success message on correct credentials. That makes sense, as it's workflow oriented. I'm ok to return to same page with error message in case of failure, and go to login page with success message in case of success.
But in all cases, hiding messages with display:none in your template is not recommended at all.