Fix User.generateUserId()
Make run-test to return error code if casperjs fails