@Override
    public Bundle updateCredentials(
            final AccountAuthenticatorResponse response, final Account account,
            final String authTokenType, final Bundle options) {

        final Intent intent = new Intent(context, LoginActivity.class);
        intent.putExtra(PARAM_AUTHTOKEN_TYPE, authTokenType);
        intent.putExtra(KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response);
        if (!TextUtils.isEmpty(account.name)) {
            intent.putExtra(PARAM_USERNAME, account.name);
        }

        final Bundle bundle = new Bundle();
        bundle.putParcelable(KEY_INTENT, intent);
        return bundle;
    }
The user has requested to add a new account to the system. We return an
intent that will launch our login screen if the user has not logged in
yet, otherwise our activity will just pass the user's credentials on to
the account manager.
app/src/main/java/com/github/pockethub/android/accounts/AccountAuthenticator.java