bb_cookie.php is the file which stores login determination. I think, you just need to include it (including setup_mysql.php also) and call user_logged_in() function like it is made in index.php
Ok, so this is somewhat related to the thread I just made.
I want to do this also, at the top of mine.
I tried making a new file to test how this would work, I removed the defines, so I could include the files but still nothing.
I think this is a big feature that someone here should write a document on.
I've been up since 9 PM yesterday till now trying to make this lol.