Fixed bugs: not registering user unless they added someone.
Cleaned up referral function (removed useless code)