title: App freezes when signing back after logout - firebase
body: <p>I just added a logout button to my app. First of all, there is no problem at the beginning. When touching the logout button, it works and throws me to the loginviewcontroller. However, when touching the play button after re-signed in, the app just freezes without giving any error. When I restarts the app and the app works without any problem. I have no idea about the issue. </p>
  
  <pre><code>if (logoutBtn?.contains(location))!{
  
              if isEnabled == false {
  
              } else if isEnabled == true {
  
                  logoutBtn?.color = customColor
                  logoutLabel?.fontColor = fontColor
  
                  try! Auth.auth().signOut()
                  let storyboard = UIStoryboard(name: "Main", bundle: nil)
                  let vc = storyboard.instantiateViewController(withIdentifier: "VC")
  
  
  
  
                  Auth.auth().addStateDidChangeListener { (auth, user) in
                      if user != nil {
  
                      } else {
                          UIView.transition(with: self.view!, duration: 0.3, options: .transitionCurlUp, animations: {
  
                          }, completion: { completed in
                              self.view?.window?.rootViewController = vc
                          })
                      }
                  }
              }
          }
  </code></pre>