Massive hack hits cryptocurrency exchange with $400-million loss