Made changes to index page template; added permission check to write posts