Login causes new window in browser



I have two twitter logins on different servers using identical twitter code. One is on https secure server. Don’t know if that makes a difference.
On https, as soon as I click twitter login, it opens a new browser window, while on the other, the same window is used.
What controls whether or not a new window is used?