telegraph: add login code (not yet wired up)