Support setting credential lifetime on command-line; code tidiness