Move session management to static helper