Fixed some console errors and oauth2 cloud bugs.