dagon's answer is the best way to achieve what you suggested, but also not foolproof as either method will result in data being stored that will eventually be deleted during clean-ups.
The standard way to do this is to have a page at the start, with options to "sign up" or "log in" - look a Facebook, eBay etc etc that is the way they all do it.
You can store cookies etc for regualr visitors, so most of the time they will be able to bypass the first screen, e.g. (at the top of the first page)
if (isset($_COOKIE['my-secret-cookie'])) {
header("HTTP/1.1 302 Found");
header("Location: http://my.server/firstpage.php");
exit;
}