Added CG_dbManager class and implementation

Abstracted database persistence layer into a CG_dbManager class and
refactored the login class to support it.