Removed old reference to $parent_id in add-post.
Sets user as logged in after user creation as well as login.