Refactor code. Closes #251

This final commit includes the unit tests for the problems when signing in into PyBossa.

The new system gives the user a hint about which method he could used in the past, when creating an account, so he can recover the password or use the right method to sign in again.