add retries check to login function and improve login drop down