Obama says Merkel is 'on the right side of history' for refugee response