raise error if unable to login
allow retry login up to max_login_attempts