Make use of ajax for displaying logs