Change workflow: Only perform login where it's really required.