Fixes login-issues via JSON-API

When using the JSON-API the translations-Object is not set in a global
scope but inside a function and is therefore not globally available.

This Pull-Request adds the global-keyword to the translations-variable to set it globally no matter where the file is included