rails app to check user agents and referrers