fixed devise authentication for viewing and editing posts