Issue 833 password protected projects

I'd like to move this class out of this module... But I don't know how  or where to place it outside... seems not to fit in any of the existing modules...
This is a class that has the responsibility of checking the authorisation for password protected projects. In this case it is a non trivial problem, as it involves not only asking the app about its password/permissions but also retrieving and/or inserting cookies, which is a task it delegates to the cookie_handler defined in another module...

What do you think @teleyinex, @therealmarv ??