Began reorganizing code to allow auth calls from the client