You can keep a flag in the database to signify the user is already authenticated.
And when the user tries to login again you can check it with this flag.
The problem with this is that it locks out users that are in the habit of simply closing browser windows instead of explicitly clicking on the "logout" button. Even if you have a timer that automatically clears these flags every hour or so (or if the user session expires), you're still locking out the user for that time frame.
A better solution would be to check whether the user is logged in already, and invalidate the previous session.
But the important question is: Why do you want to prevent this? What's wrong with a user having two open sessions?