Again all depends on when the connections or friendship took place. Obama did not begin his friendship with Bill Ayres or Tony Resco before the two became a terrorist or slum lord, he did so after, or in the case of Tony Resco during the events. To use your case, I doubt you were friends with him while the time he was going around attacking and raping people, just as I doubt you would want to be friends with him now that he has gotten out of prison.
You seem to be ignoring the fact that Obama was friends with Ayres AFTER not BEFORE the events that happened in the 60s.