Starting to split user functionality into a separate layer, reducing dependance on php endpoint