Yes! In most cases (including USA and UK) a marriage registered in Germany will be completely legal back home. As long as you follow all legal requirements in Germany, your marriage will be treated as if it had been registered in you home country.