<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _login(self, user, provider=None, remember=False, force=False, **attrs):
 """Updates user attributes and login the user in flask-login """

        user.last_login_at = datetime.datetime.now()
        user.last_login_provider = provider or self.options["default_auth_provider_name"]
        user.last_login_from = request.remote_addr
        populate_obj(user, attrs)
        save_model(user)
        flask_login.login_user(user, remember=remember, force=force)