Added test to cover various scenarios for agreements and page viewing, addresses #62.