added session check