return decrypted api key after creation

several fixes/refactors to support that