finished Bases management

will separate bases, clients and account management into separate
classes. now it is all in ctrl.lib.php