What's wrong with checking the session for a value to see if they're logged in, and if they're not then display a form. If they're logged in, then there's no form so they can't log in again!
Or are you asking about someone logging in from 2 different places? In this case I'd use a database to track whether someone is logged in or not. Set the database to mark when they log in, and also provide a 'log-out' feature! When a user logs in, check that the last access wasn't within say 20 minutes (they might have moved location). If it is, deny access, if not, then allow it.