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.