title: Swift OSX - Parse.com - Save new user without changing
body: <p>I am trying to add new users on my database using Parse. I can't save the new user directly without calling the sign up method, but after signing up the user changes to the user that was signed up and I want to keep the same user that was using the software before.</p>
  
  <p>I found on this link <a href="https://stackoverflow.com/questions/27946748/creating-new-users-without-resetting-current-user-session">here</a> in StackOverflow that I need to save the previews session and after the new user sign up process I can call the method <code>become</code> to recover the user that was being used before using the saved session, but it is returning me an error: <code>[Error]: invalid session token (Code: 209, Version: 1.15.3)</code>. Here is the code:</p>
  
  <p>Usuario.swift</p>
  
  <pre><code>import Foundation
  
  import Parse
  
  class Usuario: PFUser {
  
      @NSManaged var nome: String?
  }
  </code></pre>
  
  <p>The action to save the new user</p>
  
  <pre><code>@IBAction func adicionarGerenciadorButtonClicked(_ sender: NSButton) {
  
      let gerenciador = Usuario()
  
      gerenciador.nome = nomeGerenciadorTextField.stringValue
      gerenciador.username = emailGerenciadorTextField.stringValue
      gerenciador.email = emailGerenciadorTextField.stringValue
      gerenciador.password = senhaGerenciadorSecureTextField.stringValue
  
      let gerenciadorTokenAtual = Usuario.current()!.sessionToken
      print(gerenciadorTokenAtual)
  
      gerenciador.signUpInBackground(block: {
              (success, error) -&gt; Void in
  
              do {
                  try Usuario.become(gerenciadorTokenAtual!)
              } catch {
  
              }
  
              if error == nil {
                  self.gerenciadores.append(gerenciador)
  
                  self.nomeGerenciadorTextField.stringValue = ""
                  self.emailGerenciadorTextField.stringValue = ""
                  self.senhaGerenciadorSecureTextField.stringValue = ""
              } else {
                  self.mostrarErro(mensagem: "Erro", informativo: "Houve um erro ao tentar salvar o gerenciador")
              }
          })
      }
  }
  </code></pre>