Login redirects #hash. See #11957
Fix HttpJsonResponse() for activites_json
Handle #redirect if login incorrect