Refactor global user functions into new User/Auth classes