diff --git a/atdb/atdb/settings/base.py b/atdb/atdb/settings/base.py
index d50d1746a64ba3f36c017bc0861f2b7454ac51fd..24d55402edd2f75e738ae3bcd60b17466d72db2e 100644
--- a/atdb/atdb/settings/base.py
+++ b/atdb/atdb/settings/base.py
@@ -31,7 +31,16 @@ INSTALLED_APPS = [
     'bootstrap_pagination',
     'django_tables2',
     'bootstrap3',
-    'fontawesome-free'
+    'fontawesome-free',
+
+    ## These are required for ASTRONauth
+    'django.contrib.sites',
+    "astronauth",  # it is important that astronauth is included before allauth
+    'allauth',
+    'allauth.account',
+    'allauth.socialaccount',
+    'allauth.socialaccount.providers.keycloak',
+
 ]
 
 MIDDLEWARE = [
@@ -202,3 +211,17 @@ AGGREGATES = ['failed','active','total']
 QUERY_LIMIT_MULTI_CHANGE = 1000
 MAX_MONITORING_HISTORY_HOURS = 7 * 24
 SERVICES_LATE_WARNING_SECONDS = 1800
+
+# astronauth settings
+SITE_ID = 1
+
+SOCIALACCOUNT_PROVIDERS = {
+    'keycloak': {
+        'KEYCLOAK_URL': 'https://sdc-dev.astron.nl/auth',   # replace by https://keycloak.astron.nl/auth for production
+        'KEYCLOAK_REALM': 'SDC',    # change this depending on which realm to use
+        'SCOPE': ['openid', 'profile', 'email']
+    }
+}
+
+SESSION_COOKIE_NAME = 'my_service_name_session_id'
+CSRF_COOKIE_NAME = 'my_service_csrftoken'
diff --git a/atdb/atdb/settings/dev.py b/atdb/atdb/settings/dev.py
index 3e9765a64d78277b567ed66c1a53796418fd56ff..8d068e9f5a26a000cac72665acb8780e0d0b72f9 100644
--- a/atdb/atdb/settings/dev.py
+++ b/atdb/atdb/settings/dev.py
@@ -13,7 +13,7 @@ DATABASES = {
          'ENGINE': 'django.db.backends.postgresql_psycopg2',
          'USER': 'atdb_admin',
          'PASSWORD': 'atdb123',
-         'NAME': 'atdb_ldv_27jan2023',
+         'NAME': 'atdb_ldv_astronauth_6feb2023',
          'HOST': 'localhost',
          'PORT': '5432',
     },
@@ -23,3 +23,13 @@ DATABASES = {
 # https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators
 
 AUTH_PASSWORD_VALIDATORS = []
+
+SOCIALACCOUNT_PROVIDERS = {
+    'keycloak': {
+        'KEYCLOAK_URL': 'https://sdc-dev.astron.nl/auth',   # replace by https://keycloak.astron.nl/auth for production
+        'KEYCLOAK_REALM': 'SDC',    # change this depending on which realm to use
+        'SCOPE': ['openid', 'profile', 'email']
+    }
+}
+
+LOGIN_REDIRECT_URL = "http://localhost:8000/"
diff --git a/atdb/atdb/urls.py b/atdb/atdb/urls.py
index b5e26030204398c859780fb37edeeff0d684c834..772e9a544afa52cd65eca218472d4589309da4c0 100644
--- a/atdb/atdb/urls.py
+++ b/atdb/atdb/urls.py
@@ -6,4 +6,5 @@ urlpatterns = [
     path('atdb/', include('taskdatabase.urls')),
     path('atdb/admin/', admin.site.urls),
     path('atdb/api-auth/', include('rest_framework.urls')),
+    path("atdb/astronauth/", include("astronauth.urls")),  # include astronauth
 ]
diff --git a/atdb/requirements/base.txt b/atdb/requirements/base.txt
index ac71b471c94cb22ea3a47e7a4ae72571378190e4..f110b69e26890c14cce29179b345af89dc70b4b0 100644
--- a/atdb/requirements/base.txt
+++ b/atdb/requirements/base.txt
@@ -1,12 +1,33 @@
+asgiref==3.5.2
+astronauth==0.3.3
+certifi==2022.12.7
+cffi==1.15.1
+charset-normalizer==3.0.1
+cryptography==39.0.0
+defusedxml==0.7.1
 Django==3.1.4
-djangorestframework==3.12.2
-django-filter==2.3.0
-psycopg2-binary==2.9.3
+django-allauth==0.52.0
+django-bootstrap-pagination==1.7.0
+django-bootstrap3==14.2.0
 django-cors-headers==3.6.0
+django-crispy-forms==1.14.0
 django-extensions==3.1.0
-django-bootstrap-pagination==1.7.0
-whitenoise==5.0.1
-six==1.15.0
+django-filter==2.3.0
+django-property-filter==1.1.2
 django-tables2==2.3.4
-django-bootstrap3==14.2.0
-fontawesome-free==5.15.2
\ No newline at end of file
+djangorestframework==3.12.2
+fontawesome-free==5.15.2
+idna==3.4
+oauthlib==3.2.2
+psycopg2-binary==2.9.3
+pycparser==2.21
+PyJWT==2.6.0
+python3-openid==3.2.0
+pytz==2022.6
+requests==2.28.2
+requests-oauthlib==1.3.1
+six==1.15.0
+sqlparse==0.4.3
+tzdata==2022.7
+urllib3==1.26.14
+whitenoise==5.0.1
\ No newline at end of file
diff --git a/atdb/taskdatabase/templates/astronauth/navbar.html b/atdb/taskdatabase/templates/astronauth/navbar.html
new file mode 100644
index 0000000000000000000000000000000000000000..2e4a6bdaea4b264542b9a5b03034e3c038dc919f
--- /dev/null
+++ b/atdb/taskdatabase/templates/astronauth/navbar.html
@@ -0,0 +1,39 @@
+{% load static %}
+{% load account %}
+
+<nav class="h-navbar custom--navbar">
+    <ol class="h-navbar-list">
+        <li class="h-navbar-list__item">
+            <a href="{% url 'index' %}">
+                <img class="h-navbar-logo" src="{% static 'astronauth/images/astronauth.svg' %}"
+                    alt="ASTRONauth" />
+            </a>
+        </li>
+
+        <li class="h-navbar-list__item">Custom Header</li>
+
+        {% if user.is_authenticated and user.is_staff %}
+        <li class="h-navbar-list__item">
+            <a class="button text--primary" href="{% url 'admin:index' %}">
+                Admin Page
+            </a>
+        </li>
+        {% endif %}
+    </ol>
+
+    <ul class="h-navbar-list margin-right">
+        {% if "/login/" in request.path or "/logout/" in request.path %}
+        {# don't render antyhing #}
+        {% elif user.is_authenticated %}
+        <li class="h-navbar-list__item">
+            Logged in as:<p class="text text--semi-bold margin-left"> {{ user.get_username }}</p>
+        </li>
+        <li class="h-navbar-list__item">
+            <a class="button button--secondary margin-right" href="{% url 'account_logout' %}">Logout</a>
+        </li>
+        {% else %}
+        <li class="h-navbar-list__item">
+            <a class="button button--secondary margin-right" href="{% url 'account_login' %}">Sign in</a>
+        </li>
+        {% endif %}
+    </ul>
diff --git a/atdb/taskdatabase/templates/taskdatabase/base.html b/atdb/taskdatabase/templates/taskdatabase/base.html
index 384c0fd7bb0b3ec8abc7aeada1e07463a54ea59b..4e81c7b51a0f65b5a8a89e60b36b1587645a6c56 100644
--- a/atdb/taskdatabase/templates/taskdatabase/base.html
+++ b/atdb/taskdatabase/templates/taskdatabase/base.html
@@ -27,14 +27,17 @@
 
     <link rel="stylesheet" type="text/css" href="{% static 'taskdatabase/style.css' %}"/>
     <link rel="icon" href="{% static 'favicon.ico' %}">
-
+    <link rel="stylesheet" href="{% static 'astronauth/css/dias.css' %}">
     {% block extra_js %}{% endblock %}
 
 
 </head>
 <body onload="readFromLocalStorage('search_box')">
+    {% include "astronauth/navbar.html" %}
     <nav class="navbar navbar-expand-lg navbar-light bg-light">
         <div class="container-fluid">
+
+
             <ul class="nav navbar-nav">
             <!-- Header -->
                 <li><a class="navbar-brand" href="{% url 'index' %}">
diff --git a/atdb/taskdatabase/templates/taskdatabase/index.html b/atdb/taskdatabase/templates/taskdatabase/index.html
index 8c8de66b1d0dafac2abab405d6b114d636197657..d83edee3d12a3c73aea22a2b867adc843165b3ba 100644
--- a/atdb/taskdatabase/templates/taskdatabase/index.html
+++ b/atdb/taskdatabase/templates/taskdatabase/index.html
@@ -34,7 +34,7 @@
         {% include 'taskdatabase/pagination.html' %}
        </div>
     </div>
-    <p class="footer"> Version 6 Februari 2023
+    <p class="footer"> Version 6 Februari 2023 - 14:00
 
 </div>