Addin run function and register_login function