The REST login now checks the certificate before it posts the password (#17) and then tells a web page from a refused login (#13); the two login-answer checks moved into _require_login so connect() stays within the function-length limit. #13's REST tests stand in for the switch's certificate, since connect() fetches it before the login.