Rework authentication workflow (basically reset to same as base plugin)