Refactor the session into its own configurable service