add controller test for gallery and guestbook. fix some bugs