1. add reboot and poweroff support
2. add a function to get input params from request