Doesn't away goals should count as double?

On first leg my team won 2-1 at home then at second leg the final result was 2-1 also.

So we went to extra-time where both of us scored 1 goal. But why my team lost the game even scoring an away goal?