added DB and Login functionality