Corrects for current database structure for creds

Also allows for null values in fields.