diff --git a/localshop/apps/packages/views.py b/localshop/apps/packages/views.py
index <HASH>..<HASH> 100644
--- a/localshop/apps/packages/views.py
+++ b/localshop/apps/packages/views.py
@@ -1,6 +1,7 @@
 import base64
 import logging
 
+from django.conf import settings
 from django.contrib.auth import authenticate
 from django.core.exceptions import ObjectDoesNotExist
 from django.http import Http404, HttpResponse, HttpResponseBadRequest
@@ -20,6 +21,8 @@ from localshop.apps.packages.utils import parse_distutils_request, validate_clie
 
 logger = logging.getLogger(__name__)
 
+basic_realm = getattr(settings, 'BASIC_AUTH_REALM', 'pypi')
+
 
 @validate_client
 class SimpleIndex(ListView):
@@ -45,6 +48,7 @@ class SimpleIndex(ListView):
         if not auth:
             response = HttpResponse('Missing auth header')
             response.status_code = 401
+            response['WWW-Authenticate'] = 'Basic realm="%s"' % basic_realm
             return response
         method, identity = auth.split()
         username, password = base64.decodestring(identity).split(':')
Make sure we mark the <I> response as WWW-Authenticate and the correct realm.