Added authentication for editing post
add slugging and ajax