Fixes #829: loginRequired now responds with HTTP 403 in case of AJAX or loginUrl is not set