<script type='text/javascript'>
    setTimeout(function () {
        if (typeof Login == 'undefined') {
            location = '<?php echo $RedirectApplicationURL; ?>';
        } else {
            Login.onLogin('<?php echo $token; ?>', '<?php echo $RedirectApplicationURL; ?>', '<?php echo $topic; ?>');
        }
    }, 1000);
</script>;