Close gh-437.

Updated the login logic so that now if two login screens are open at the
same time the second login wins.