Added haskell impl of logout function