Users not redirected to previous page upon successful login

Hi! :wave:

When I receive a Discourse mail notification to a private topic, I open the link to the topic and I am not logged in, I get an Oops! That page doesn’t exist or is private page. That’s expected.

But when I log in from that page, I would expect returning back to this page after a successful login. And that doesn’t happen – the Log In button appears to be a plain link to /login and after logging in I end up on /categories.

Is this by design? Is there a config option to tweak perhaps? Thank you!