Fix bugs in issue370: -save comments correctly in adding and editing -co...

...rrect indentation in entryview.php and header.php - correct the logout -adding more script