updated the api to associate mediums with owners, and added a Login flow for the API.