Added a callback parameter to the logout mechanic.