Calling Mastodon API in R Studio

please can someone help me figure out what is going on? I used the mastodon library in R Studio to successfully access the mastodon API and fetch some fediverse data. Here is the code I used:

tokens <- login("",user = user,pass = password)

"user" is my email address.

Unfortunately, I lost all the data. Now trying it again, I get an error message, which I do not understand:

Error in UseMethod("content", x) : 
  no applicable method for 'content' applied to an object of class "response"

Please, can a good samaritan who has also used this library in R Studio help me figure out what is going on? I need to prepare a report on this project. Thanks in advance of your response.