Disable Back Window when Notification is displayed

i have a main window which shows a login screen.

  1. if a user enters incorrect login credentials it will show a notification of type ERROR in red color.
  2. if the user doesn’t close the notification and tries to re-login and committs another mistake in entering the login credentials. its showing another notification on top of the previous one.

how can i make sure that the notification is closed before he tries re-loggin in?

is there a way to force the user to click or close the error notification?