Change method of connect with redis, remove redundant middleware.