added app and user classes
made db a global variable using "g"
completed problem, user, and app classes