sounds prittey trickey.. you could make a new column to your users table that updates to ex 2 when they log in and to 1 when log out.. a online/offline checker. and then check users status in login
something like:
storeing last login date and time would probably also be a good thing.. this one works AS LONG as your members click the logout link when they are finished.. if they close the browser or leave the site without logging out that username will not be accessable becourse it will say users already online.. so i would say you think about some kind of date time thing.. if they are online but last login was 2days ago.. then let users pass or something..
hope i helped
Wille