log out current user via script

Is it possible to log out the current user via script?
Code in HTML behind the logout button:
function() {
r.close(), root.ninoxCloudLogout()
}
Is there any way to call the function?
Guys any answers for this? It is an iportant question!!