Refactor db auth./serial config. to separate files