Added security features for editing posts