Implementing redis session functionality