#2245 allow anonymous to view gallery
#2245 make gallery obey user's per page setting