portal_login: implement retry logic
create_distributor: full retry logic
stageportal.py: fix login retry