Fix 500 error by switching to new team memberships API.

This should solve our woes from #1.