In nova/OpenStackNovaUser.php, I can see that saveToken() is trying to save a long token, but when we retrieve it in loadToken() we only get 256 bytes.
This means that save/load token are totally broken, which is no doubt contributing to that awful log-out-and-in-again issue on wikitech.