def login(email, password)
      # Derive an hash from the user password
      password_hash = hash_password(password)
      u_hash = user_hash(password_hash, email.strip.downcase)

      resp = request(a: 'us', user: email.strip, uh: u_hash)

      @master_key = aes_cbc_decrypt(password_hash, Utils.base64urldecode(resp['k']))
      @rsa_privk = decrypt_rsa_private_key(resp['privk'])
      @sid = decrypt_session_id(resp['csid'])
      @shared_keys = {}

      return self
    end
def login(email, password)
      # Derive an hash from the user password
      password_hash = hash_password(password)
      u_hash = user_hash(password_hash, email.strip.downcase)

      resp = request(a: 'us', user: email.strip, uh: u_hash)

      @master_key = aes_cbc_decrypt(password_hash, Utils.base64urldecode(resp['k']))
      @rsa_privk = decrypt_rsa_private_key(resp['privk'])
      @sid = decrypt_session_id(resp['csid'])
      @shared_keys = {}

      return self
    end
If the user_hash is found on the server it returns:
 * The user master_key (128 bit for AES) encrypted with the password_hash
 * The RSA private key ecrypted with the master_key
 * A brand new session_id encrypted with the RSA private key