we are trying some kind of Pop-Up Notification, when user wants to close Browser -> then gets reminder that he has to logg out.
You can't halt browser close action. You can use a JS pop-up (alert( 'MESSAGE HERE' )
to halt closing of a browser tab, but a lot of browsers block them or it will simply just frustrate the user (I would never return to a site that did that). Most often such practices are classified as spam and considered bad practice. I highly advise against using such methods.
If you want to log the user out on browser close you should develop some sort of plugin, extension, etc.. that uses JS to detect window close and performs a quick AJAX to a URL of your plugin, extension, etc.. that logs the user out automatically.