added login attempt to try multiple times if it fails