Eisenstein cohomology and automorphic $L$-functions