Added get_referrer function to Application Controller