The situation Shane describes -- "all the previous sessions are still stored so the information goes into the wrong databases" -- doesn't make sense.
PHP session cookies are, by default, set to a lifetime of "0," which means any normal browser will delete the cookie when the browser is closed.
Without the cookie, there is no "handle" to grab the data that might or might not persist server-side. In other words, this problem does not exist.
If you are propagating the session ID in the URL, and allow that to continue through a new login, that's your own fault.