move session saving/restoring methods to Session class