Issue 833 password protected projects

PR 2/3 of PyBossa/pybossa#833

It also includes some older fixes not yet merged to master.