I have an asp.net website that can be logged in from two different websites. Upon logging in, the website will make a call to database and create an session variable to determine which data to load something like Account_ID. The session variable will be used throughout the website to determine which data to show to the user.
The problem starts when a user logins with two different accounts at the same time on same browser using two tabs. My understanding is the session variables might be messed up and the website shows wrong data (i.e. The first tab show second user's data after second user logged in).
The user shouldn't do that but I have no way to prevent the user from doing this at the moment. So how do I prevent this? The website is running on ASP.Net 4 and has custom login procedures but uses form authentication.