Logout functionality, and post creation redirect fix