Added support for client state persistency.