moved all mysql queries for selecting public keys to api, make public/private key getter return NULL