Added a check for anonymous user

This will only show text for a non-logged in user and shows links for the logged in user.
This is for my task - https://www.google-melange.com/gci/task/view/google/gci2014/5245011075530752
If we have multiple calls to getopt, like here, can optimsie by putting permit = auth.s3_has_permission outside the loop & then just using permit() inside the loop (This example shortening is in common use elsewhere in the code)