anchor.diff:                                     msg => UsrMsg} }
               };
           {{ok, _}, oidc, true} ->
  +            logout_rsp_session(Session),
               {error, #{result => error, user_msg => DoneMsg}};
           {{ok, _}, oidc, _} ->
  +            logout_rsp_session(Session),
               {error, #{result => error, user_msg => OffMsg}};
           {{ok, _}, rest, _} ->
  +            logout_rsp_session(Session),
               {error, #{result => error, user_msg => RestMsg}};
           _ ->
               WMsg = "SESS~p additional login request for ~p failed: ~s",
               lager:warning(WMsg, [SessionId, ServiceId, Provider]),
  +            logout_rsp_session(Session),
               {error, #{result => error, user_msg => Msg}}
       end;
   handle_credential_result({error, Map}, ServiceId, Session, _Params)
  
positive.code:     ok = watts_session:set_rsp(Rsp, SessPid),
      ok = watts_session:set_redirection(ServiceId, Params, Provider,
                                         SessPid),
      {ok, SessPid};
  rsp_session_or_error(false, _, _, _, _, _) ->
      {error, bad_request}.
  
  
  session_with_error(Msg) ->
  
negative.code:                         [SessionId, Error, Reason, StackTrace]),
              return_session_info(SessPid)
      end.
  
  
  logout_rsp_session(Session) ->
      {ok, Type} = watts_session:get_type(Session),
      logout_if_rsp_session(Type, Session).
  logout_if_rsp_session({rsp, _, _}, Session) ->
      logout(Session);
  logout_if_rsp_session(_, _) ->
      ok.
  
  
  
  logout(Session) ->
  