add function login for sdk