Added ability to logout and persist sessions