implement auth process (unfinished)