Logs out a user. Although you can use this method by calling
if ($user->isLoggedIn()) $user->logout();
Redirecting someone to users/logout.php is preferable because it also destroys sessions and runs any logout scripts that you may have created or decide to create in the future.