Be very careful when using sessions as your record of whether or not a visitor is logged in. There is not a unique relationship between users and sessions.
For example, if you have a couple of people on a corprate (or school, or even internet cafe) network accessing your site, they may well be coming from behind the same proxy server. In this case, your server won't be able to tell one from the other.
You could end up in the situation where one user on a school/office/cafe network logs in as normal, and anyone else who logs on from the same network is assumed to be the same person and so get to be logged in, without ever authenticating themselves. I leave it up to you to work out the implications of that!