finished gallery admin and client logic