added sha1 password support to host.js.
implement crypted_password in host.coffee and optimize its generation.