Fixed SQLException when retrieving recently taken quizzes from DB

Also implemented some more test code to display popular quizzes,
recently created quizzes and recently taken quizzes on homepage