Fix duplicate login bug