Implemented user membership logic in middle tier