Implementation of Secrets PDO class and some other changes for /oath calls