Tachyonic fields in cosmology