How to block simultaneous user login from different tabs in the same browser
===

My application uses spring3 mvc, I want to redirect the user to the same page if the user open two tabs & try to login simultaneously using different userId's .

Like the gmail functionality, if two users login from two different tabs the first user will get logout & see a session timeout message.