Obama is not the greatest president of the last 50 years. Any Republican will tell you otherwise. Any independent will tell you otherwise. Any sane, non-hackish Democrat will tell you otherwise. And frankly, Sanders distancing himself from Obama makes him more electable than Hillary "I'll just be Obama's third term!" Clinton.
You may think this, but polls show that real Democrats disagree. Obama is very popular with Democratic voters. Sanders is in an awkward position where he is running an anti-establishment campaign while a President that most of his supporters like is in office and so far he has toed the line very carefully.