subscription related code updated to validate user session