update code on addbookapplet and login to work with database (finished)