more generalized time and random function in session and advPassword library