added authentication methods to posts_controller file