Added functionality to accept and persist sent referrals in backend