When I arrive on Stack Overflow, I'm not initially logged in and if I try to participate (e.g., voting on a post), I'm asked to either sign up for an account or log in. So far so reasonable.
The problem is that after logging in, the site navigates away from what I was doing. In my case, I tried to upvote a post, got asked to log in (or sign up), which I promptly did. Instead of registering my vote or at least returning to the post I was reading (so I can try to vote again - this time as a known user), the site navigated to my account home page. That is illogical... My goal was to vote - why take me to an unrelated page?
Your site needs to differentiate between these two possible scenarios:-
Scenario 1: If a user explicitly clicks on the login button, they intend to login. Navigating to the account home page is precisely the correct response.
Scenario 2: If a user attempts to do something only permitted for registered users and the site needs to identify the user first, remember: signing up/logging in was NOT the request the user made. Navigating to the account home page is an unwelcome interruption in the user's task. After completing the login process, the logical next step is to finish with the task that required the user to log in... The account home page is unrelated to that goal.