Backport RestrictSessions and CheckpointCharlie

@michalroszka