On the signed graphs with two distinct eigenvalues