added Protocol as REST resource; enforces json response to auth responses; chanage ha command request to return 302 when correct