Referral system

Closes #660.
Implemented in da1c776f67b655648d9009084e2f813bfc44b431.