added the base db storage adapter. changed the lgoin flow. fixed some inconsistencies