Web and REST authentication sorted out.