I'm really not sure whats wrong with casper or phantomjs or my thinking but i'll try to explain in pseudocode:
casper.start(
http://mywebsite)
casper.echo(localstorage.getitem(accesstoken)) # 23489237493
# i'm logged in
casper.evaluate(localstorage.clear())
#reload
casper.start(
http://mywebsite)
#verify i'm logged out by testing for login form
#now do someting to log in (get new accesstoken)
# and log out again by clearing localstorage
casper.evaluate(localstorage.clear())
casper.echo(localstorage.getitem(accesstoken)) # null
# i'm logged out
# i also can verify that i'm logged out by takin screenshots and testing for my login form
#end
thats how i have to run my test, as everytime the test starts the accesstoken is set.
so i think the basic question is: when is the state of localstorage persisted.