added timeouts to logouts and made purge optional on sync