The first one is because Tony Stark is an idiot. I love the character but he's still an idiot. He's careless and extremely overconfident that's precisely one of the points they want to illustrate. I wouldn't mind it that much if Iron Man 3 didn't exist or if it was a different movie. In Iron Man 3 you see him struggling with the consequences of being an ass to almost everyone and being just as careless too, and in the end he's moving towards quitting trying to being a hero because he's simply not, at best he's just a crazy vigilante.
Then AoU comes and bam, he's back on track like nothing happened. I mean we get to see those Iron Man robots, maybe he was trying to automatize his "hero" labours as a halfarse excuse but we don't even get an explanation over that. Anyway he didn't learn all that much from what happened on Iron Man 3 and that's why crap hit the fan.
I can relate to his motivation of trying to "armour" the whole world but as pointed out he's simply careless. As for the "real" reason, dunno, he's simply careless or Jarvis needed to be connected to internet by some reason, or maybe part of Jarvis resided on the internet. It's hard to find a workplace that doesn't have internet connection, and even if the experiment on it was conducted on a "enclosed" place that didn't helped much once the AI got into a iron man robot body. I guess those robots have all kind of wireless connections that would allow him to scape in a million ways.
The second one, Hydra agents still need facebook, they are humans after all, well most of them anyway.