fixes #5450 - add realm to params for 1.4-compatible use in templates