Adding session copying to state/settings.go