fixed missing err in upgrade script
#1110 - moved isEmailAvailable into User.email
fixed #1161 properly - Merge remote-tracking branch 'origin/master'

Conflicts:
	src/upgrade.js