Some refactoring to make a clearer _API_. Also started update authenticated user.