meanjs/mean — pull request #25 by kwakayama (2014-04-16 08:29:13+00:00)
Title: The server crashes when I try to login with username and password to an oauth account.

Problem:
The salt is only set on local authentication. Otherwise it is undefined.

To reproduce the error:
- sign in only with an oauth strategy (without local strategy)
- copy your username
- logout
- try to login with the copied username and a random password
- server crashes in the hasPassword function of the user model
```
crypto.js:570
return binding.PBKDF2(password, salt, iterations, keylen, callback);
```
I added a check of password and salt in user auth.