log out being shared with bootstrap.php
I just tested this and it works as you'd expect it to work for me locally:

&lt;?php

$craft = require '/path/to/craft/app/bootstrap.php';

if ($craft-&gt;userSession-&gt;isAdmin())
{
    echo 'I am an admin.';
}
else
{
    echo 'I am not an admin.';
}

if ($craft-&gt;userSession-&gt;isLoggedIn())
{
    echo 'I am logged in.';
}
else
{
    echo 'I am not logged in.';
}