Fixed double-login bug