updated for redis session management.