hitler was a hospital patient when the war ended , and was outraged by the subsequent treaty of versailles , which deprived germany of various territories , demilitarized the rhineland and imposed other economically damaging sanctions .