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
You can leave the test for has_module(app) as-is, and put the premission checks inside.  With the above, it is going to call has_module twice.