Add scope support to oauth2. Tests.