fix a bunch of bugs

finish b64-encoding with a Close() method

you need to load a sigchain to at least one link if you don't have a public key active