Replacing the Login class in db. revised