get session data at the moment it's needed