Handle wifi log-in

The main change here is to add functionality to handle cases where wifi log-in is needed (commit 39c6bac).