invoice_ui: forgot a @les; change to @log_entries
key_value: put! should return nil
template_ui: use KeyValue for storing template id

This should fix #27.