Move Redis session code to helpers.
Raise error if session is empty.