added lines to initialize a newUser before encodeing and saving it
added lines to initialize a newUser before encodeing and saving it

silinternational/google-api-php-client-mock,silinternational/google-api-php-client-mock