Luminescent nanomaterials containing rare earth ions for security printing