logoff returns deferred, need to handle error
fix typos, error messages, global reference