added req.session functions