Fixed abug causing the app to crash on some devices
Optimized the handling of login failures (3x retry)