Usergrid 2099

WARNING: Please review the comments in https://apigeesc.atlassian.net/browse/USERGRID-2099 before approving this PR.