Improvements to power-control-logins script