Server-side of refactored CJ session restoration