changed database scheme; added login, diary index