[RedirectLoginHelper] make random function private