Imagine there's a website with its content, but it also offers accounts that users can activate through this website. The account is basically the main functionality. (The website is mostly about this account and what to do within it).
My problem is: on a website the logo directs to the homepage. But what about the same logo within the account, when the user is logged in. Should it direct to the website home page or the account dashboard? What would users normally expect?]
The logo normally navigates (and is expected to) to the highest level of the websites hierarchy.
Does the hierarchy of the account section depict the home page at the top or the account dashboard?
In general, the user will expect this to take them to the home page - it may be worth adding a notification to say something along the lines of 'are you sure you wish to navigate away from your account?' to let the user know this is about to happen.
User would normally expect going back to the home page.
The solution to your problem can be a breadcrumb notion which would help user navigate back to the account dashboard instead of homepage.
Find out more about breadcrumb here
Here is a rough wire-frame for the concept explained above