The last time an admitted Socialist ran in a major US election was 1934 and the candidate was Upton Sinclair. He was running as the Democratic Party candidate for the office of Governor of California. What happened has some hard lessons for the Sanders campaign and I hope they've studied it.
Fortunately, there are some resources readily available. Sinclair himself, a successful and historic author, his novel, The Jungle, resulted in the passage of the Meat Inspection Act and the Pure Food and Drug Act of 1906, wrote an account of his run in a surprisingly good spirited book called I, Candidate for Governor: And How I Got Licked (Berkeley, CA: University of CA Press, 1934, 1935 ISBN 0-520-08198-6). Recently another book on the campaign was republished, The Campaign of the Century: Upton Sinclair's Race for Governor of California and the Birth of Media Politics by Greg Mitchell (CreateSpace Independent Publishing Platform, 2011, ISBN-13: 978-1468075724). I read Sinclair's book years ago after finding it on a remainder table but haven't read Mitchell's book yet. I may before this campaign season is over though.
There is at least one documentary on the 1934 California gubernatorial campaign too. It's part of a PBS series on the Great Depression, about an hour long, and available in full online. It's called "We Have a Plan" https://youtu.be/...
Even though Sinclair won the Democratic Party nomination, he was never endorsed by FDR and, at the end of the campaign, the state party leaders threw their weight behind a third party candidate while Hollywood and the major media outlets launched the first coordinated political media blitz to stop "Sinc-liar the Socialist."
Even if Bernie wins the nomination by acclamation, he should watch out for Democratic knives in his back.
"The future, if it remembers me at all, may forgive blunders caused by a too impetuous desire to stop the starving of men and women, and especially of little children, in a world which has learned to produce more than it can consume." - Upton Sinclair
"I would rather vote for an atheist who acts like a Christian than a Christian who acts like an atheist," electric sign on a Methodist Church during the 1934 CA Gubernatorial campaign.
End Poverty in California
http://www.dailykos.com/...
The Jungle of Journalism: Upton Sinclair on the Press
http://www.dailykos.com/...
My notes on I, Candidate for Governor: And How I Got Licked by Upton Sinclair
http://hubeventsnotes.blogspot.com/...
Book Review of The Campaign of the Century by Susan Gardner
http://www.dailykos.com/...
Final Statement of the End Poverty in CA or EPIC Plan
http://www.ssa.gov/...
Reading the EPIC plan, I was reminded of the stories I heard about the self-organizing workers did during the economic crisis in Argentina from 1998 to 2002. Sinclair took some of his ideas from the ad hoc cooperatives and production collectives that arose in CA and other parts of the country during the Depression. These same kinds of voluntary associations appeared in Argentina when their currency collapsed. I suspect that this is something that will always happen when hard times come and people have the opportunity to form their own work groups. Kropotkin would be proud. What Upton Sinclair called "production for use" is practical, real, and an available alternative whenever hard times come.