fix script position - it was getting spliced out for not-logged-in users