Fixes login issues with JS

When user entered wrong credentials a login screen still tried to fetch
allowed organizations. Also an error notification was not displayed.
Merge pull request #2348 from ares/bug/login_unauthenticated_requests

Fixes login issues with JS