Fixed issue with secret token not being saved if DB does not exist.