diff --git a/lib/login.dart b/lib/login.dart
index ad4ec370c8b928eb19dd5b9080986ba38111b78b..4cb9efe624e2ac6ac94be34ffba8b37e60ca246d 100644
--- a/lib/login.dart
+++ b/lib/login.dart
@@ -11,11 +11,13 @@ Future<int> login() async {
   String url = 'https://sandbox.sensor.awi.de/rest/sensors/contacts/login';
   debugPrint("Start login to : " + url);
 
-  final String body = jsonEncode(configuration.loginInformation);
-  debugPrint(body);
+  // New Test:  https://stackoverflow.com/questions/58197496/flutter-post-login-with-email-and-password-with-content-type-application-x-www-f
+  Map<String, dynamic> body = {'username': configuration.loginInformation.mail, 'authPassword': configuration.loginInformation.password};
+  String encodedBody = body.keys.map((key) => "$key=${body[key]}").join("&");
+  debugPrint(encodedBody);
 
   final response = await http.post(Uri.parse(url),
-      body: body,
+      body: encodedBody,
       headers: {
         'Accept' : 'application/json',
         'Content-Type' : 'application/x-www-form-urlencoded'
@@ -23,9 +25,14 @@ Future<int> login() async {
       encoding: Encoding.getByName("utf-8")
       );
 
-
   if (response.statusCode == 200) {
     debugPrint('Login success');
+
+    debugPrint(response.body.toString());
+    debugPrint(response.headers.toString());
+    debugPrint(response.headers['set-cookie']);
+
+
     //TODO store token
 
   } else {