JPMorgan pays $400 mn to settle on mortgage securities