Added write and oauth2 to Grunt.
Added constructor context check for OAuth2.