add login fun (unfinished)