add the login,regist functions