allow functions for returnURL and realm