Fixes issue where closing invalid login dialog with enter would attempt
to relogin. This is not a perfect solution, and assumes the user will
only hit enter in a certain order.