auth logic init