Jouri, I agree with Procrastinator (although not the way they said it) you shouldn't put someones name on a paper without them agreeing to it. You may have put some new and interesting ideas in the paper that although worthy of publication weren't ideas he agreed with.
Also you said that group leaders get their names on papers without doing anything well often thats not true. Im not sure about your situation, but often they write the grant proposal for funding for the PhD/PostDoc in the first place and often (in labs) provide equiment and/or reagents that you used to get data with.
Confused, Im sorry but I think you were in the wrong. I guess with both yours and Jouri's situations the moral of the story is to talk to your supervisor (or at the very least email them). Im sure that given a few weeks things will calm down and you'll be back on track.
I hope you things work out with your new supervisor too