BTW. It makes sense that it's not possible. Image if I added YouTube to my website and the via Javascript logged you out, and asked you to login again. I could then change the login url to my own endpoint, meaning you would send your credentials to me :)