login function 1.0 done