Include connection state when determining which power menu items to show.

Fixes a bug where Power on/off could appear in the menu when there was
no connection to the server.