Added logout route and thread resource