Cohomology of algebraic stacks