Thanks for the reply.
It works this way. After I reboot the board, the REST APi doesn't work anymore. If I log on the Yun's own configure page and input password, it has no effect. The only thing that would do the trick is I open up the serial monitor (via wifi) on IDEW and connect to the board, at this time, IDE will ask for a password and if I input password there, the REST API then comes alive.