wired logout to appdelegates logout