add ensure_authentication_token method to user for api