1.1I have to close the session when the user abruptly close the browser.
There is no reliable way to track it, you could continuously poll to server using AJAX, and if you stop receiving the ajax call consider that browser has been closed
Or call a javascript method that signals your server about close, but this will not work on weird shutdown/crashes
1.2. When the user tries 'open in a new tab' - The user should be forwarded to the 'login page' in the new tab
If user is logged in, and you want to manage another session of browser's new tab, that is not possible, because browser manages cookies centrally (amongst all tabs and window). so when it sends the request it will add the cookie in the header so your application will not be able to identify,
If you manage session using other technique like jSessionId
in url parameter it is possible to do but not a 100% sure way because user can play with sessionID