usability – Which UX Principle would best define; Removing a user from their current task after requiring the user to log in


I was wondering if there was a UX principle that was being broken in the following situation and what the principle or heuristic might be so that I could conduct more research on the topic; A task is being conducted by a user, and after a few clicks into the task the system requires the user to login. After successful login, the user is then taken to a different page, no longer in the task they were performing, with no clear navigation back to the task.