title: Firebase Login Persistence Swift
body: <p>I'm using Firebase to handle my user register and login for my app. But if I log in, and then close my app entirely - the user is forced to re-log in. I'd like to keep the user logged in unless they click "Log out"</p>
  
  <p>My login code is this:</p>
  
  <pre><code>        Auth.auth().signIn(withEmail: email, password: password, completion: {(user, error) in
              if let firebaseError = error {
                  print(firebaseError.localizedDescription)
                  return
              }
              self.presentTabBar()
          })
      }
  }
  </code></pre>
  
  <p>How do I keep this user logged in unless specifically told to logout?</p>