Add a try/catch for loginSync to reinitate after delay if an error
occurred