moved method from UserAuthenticationModule to BasicUtility