Refactor authentication key handling in main.rs Add event handler for any event Fix authentication signature generation | 我tm直接就是一个感动中国 aaaaaa | key!