If you log in, you are redirected to the front page upon your return from Dataporten. If possible, we should instead redirect to the page where the user clicked login on.
Edit: I thought we didn't get to adding this in v3.0.0, but the login link actually has a next link ie.: /authenticate/login/?next=/course/11 (when current page is /course/11). It seems to be discarded by Dataporten, but it might be fixable by adjusting its configuration.