Added a logoff function

This adds the logOff function which takes a token and a callback and logsoff for that token.