President Barack Obama called for legislation Monday that would make companies warn customers earlier about when their private information is lost in a data breach and adopt stricter guidelines for the use of data collected from students.