#!/usr/bin/env node

require('../lib/fin/lib/js.io/packages/jsio')

jsio.path.shared = './lib/fin/js/'
jsio.path.server = './lib/fin/js/'
jsio.path.client = './lib/fin/js/'
jsio.path.fan = '.'

jsio('import client.fin') // makes fin globally accesible
jsio('import fan.sha1')


fin.registerEventHandler('FAN_AUTHENTICATION_RESPONSE', function() {
	process.exit()
})

fin.connect(function() {
	fin.send('FAN_REQUEST_CREATE_USER', { email: process.argv[2], password_hash: fan.sha1('123123') })
})

var sys = require('sys')
require('../lib/fin/fin')

jsio.path.fan = '..'

jsio('import fan.sha1')

var email = process.argv[2]

fin.registerEventHandler('FAN_AUTHENTICATION_RESPONSE', function() {
	sys.puts("Sucessfully create user with email " + email)
	process.exit()
})

fin.connect(function() {
	fin.send('FAN_REQUEST_CREATE_USER', { email: email, password_hash: fan.sha1('123123') })
})

Fix the user creation script
Fix the user creation script
