The behaviour of L-functions at the edge of the critical strip and applications