added keyring loading from sqlite but needs fixing. also need macros to standardize struct sizes and errors