added logout function; new_posts works