var mongoose = require('mongoose');
var bcrypt = require('bcryptjs');

// User and Admin Schema
var Schema = mongoose.Schema({
	username: {
		type: String,
		index:true
	},
	password: {
		type: String
	},
	email: {
		type: String
	},
	name: {
		type: String
	}
});

var User = module.exports = mongoose.model('agents', Schema);



module.exports.createUser = function(newUser, callback){
	bcrypt.genSalt(10, function(err, salt) {
	    bcrypt.hash(newUser.password,salt, function(err, hash) {
	        newUser.password = hash;
	        newUser.save(callback);
	    });
	});
}

@@ -327,13 +327,12 @@
 el('
-agent
+user
 s', 

Create user.js