I logged in to a friend account and now I am stuck to it.
I uninstalled social/gtav/steam/fivem and still nothing works.
Is there even a way to change the account from fivem and give me the possibility to play with my friend on the same server?
I want to connect to my own account.
FiveM does not have any accounts, you are refering to Social Clubs account.
open your social club application and log out and then log into yours.
If you do not own the game you will have to buy it otherwise it still will not work for you.