Pulling distinct photos if user is logged in

- We build complex permission queries which result in duplicate items when you're logged in
Version bump to 5.1.227