Details: Thor brings Loki to Earth. Loki magic was either stripped from him as punishment or he was unable to use it due to the fact that the Chitauri could track him with it. The brothers show up at Tony's location and ask if he can house Loki. Tony either allows Loki to use an apartment he already owned, or Tony specifically purchased an apartment for Loki's uses.
The one scene I remember is Thor and Tony showing up at Loki's apartment and they find it in disarray. They investigate and soon after find the Chitauri corpse. Now they are really worried that Loki's been taken. However, Loki reveals himself, along with Clint (who was visiting Loki), to still be in the apartment. Loki and Clint killed the Chitauris when they invaded the apartment. Afterwards, I think it was decided that Loki shoujld live in Stark Tower.
PS: I am pretty sure the fic was on AO3.