anchor.diff:      ?assert(Status =:= 201 orelse Status =:= 202).
   
   set_security(Url) ->
  -
       SecurityUrl = lists:concat([Url, "/_security"]),
       SecurityProperties = [
  -        {<<"admins">>,{[{<<"roles">>,[<<"test_admin">>]}]}},
  -        {<<"members">>,{[{<<"roles">>,[<<"test_member">>]}]}}
  +        {<<"admins">>,{[{<<"roles">>,[<<?TEST_ADMIN>>]}]}},
  +        {<<"members">>,{[{<<"roles">>,[<<?TEST_MEMBER>>]}]}}
       ],
   
       Body = jiffy:encode({SecurityProperties}),
  -    {ok, Status, _, _} = test_request:post(Url, [?CONTENT_JSON, ?AUTH], Body),
  -    ?assert(Status =:= 201 orelse Status =:= 202).
  +    {ok, Status, _, _} = test_request:put(SecurityUrl, [?CONTENT_JSON, ?AUTH], Body),
  +    ?assert(Status =:= 200).
   
   delete_db(Url) ->
       {ok, 200, _, _} = test_request:delete(Url, [?AUTH]).
   
  -create_user(UsersUrl,Name, Roles) ->
  +create_user(UsersUrl, Name, Password, Roles) ->
      
       Body = "{\"name\":\"" ++ Name ++
  -        "\",\"type\":\"user\",\"roles\":" ++ erlang:binary_to_list(jiffy:encode(Roles)) ++ ",\"password\":\"secret\"}",
  +        "\",\"type\":\"user\",\"roles\":" ++ erlang:binary_to_list(jiffy:encode(Roles)) ++ ",\"password\":\"" ++ Password ++"\"}",
  +    
       Url = lists:concat([
           UsersUrl, "/org.couchdb.user:", Name]),
  -    {ok, 201, _, _} = test_request:put(Url, [?CONTENT_JSON, ?AUTH], Body),
  -    % let's proceed after giving couch_peruser some time to create the user db
  -    timer:sleep(2000).
  +    {ok, 201, _, _} = test_request:put(Url, [?CONTENT_JSON, ?AUTH], Body).
   
   
   all_test_() ->
  
positive.code:     create_db(UsersUrl),
      create_db(Url),
      create_design_doc(Url),
      create_user(UsersUrl,?TEST_MEMBER,[<<?TEST_MEMBER_PASS>>]),
      create_user(UsersUrl,?TEST_ADMIN,[<<?TEST_MEMBER_PASS>>]),
      set_security(Url),
      [Url, UsersUrl].
  
  
negative.code:     ok = config:delete("admins", ?USER, _Persist=false).
  
  create_db(Url) ->
      {ok, Status, _, Body} = test_request:put(Url, [?CONTENT_JSON, ?AUTH], "{}"),
      ?assert(Status =:= 201 orelse Status =:= 202).
  
  create_design_doc(Url) ->
  