Automorphic functions twisted by representations, unitary and non-unitary