Added support for session persistence and connection logging.