move identity generation upwards
rename session to persistence