Attached users to galleries.

Made it impossible for non-owners to edit a galler or image.