add try/catch to referrer on base.html and add cookies to user identify info