refactor structure and login baidu login callback