diff --git a/rest_registration/api/views/login.py b/rest_registration/api/views/login.py
index <HASH>..<HASH> 100644
--- a/rest_registration/api/views/login.py
+++ b/rest_registration/api/views/login.py
@@ -68,7 +68,10 @@ def logout(request):
     if not request.user.is_authenticated:
         raise BadRequest('Not logged in')
 
-    auth.logout(request)
+    if should_authenticate_session():
+        auth.logout(request)
+    elif should_retrieve_token() and request.data.get('revoke_token', None):
+        request.user.auth_token.delete()
 
     return get_ok_response('Logout successful')
Issue #<I>: added revoke_token option (#<I>)

* Added revoke_token option

* Formatted to PEP8