Added to remove dialog if login fails.