Online Learning with Primary and Secondary Losses