Modify when sessions are enabled, and add express-resource