Added entities and DAO, added security