You set the api endpoint as follows:
cf api https:
and then you log in to cf login .
Alternatively, you can use a European endpoint:
cf api https:
EDIT:
Alternatively, as you suggested, you can pass the API endpoint to cf login directly using the -a option:
cf login -a https://api.ng.bluemix.net -u <ibm.com id>
Marc fraioli
source share