Made Db class singleton and added DB global var to user controller.