API for saving and retrieving user details