A modularity based spectral method for simultaneous community and anti-community detection