only use login api if it is enabled