Added retry logic for loginsync