bug fixes and change from bcrypt to bcrypt-nodejs