Attempt to speed up members page

I haven't figured out how to test this. I experimented with queries interactively on the production database, but have not run this code.

DO NOT MERGE THIS!