Radiation from laser accelerated electron bunches: Coherent terahertz and femtosecond X-rays