 console.log '1112222', Config2.get( 'a')
 ###
 
-class App.Ajax
+class App.Com
+  _instance = undefined # Must be declared here to force the closure on the class
+  @ajax: (args) -> # Must be a static method
+    if _instance == undefined
+      _instance ?= new _Singleton
+
+    _instance.ajax(args)
+    _instance
+
+# The actual Singleton class
+class _Singleton
   defaults:
     contentType: 'application/json'
     dataType: 'json'

    cache: false
    async: true

  ajax: (params, defaults) ->
    $.ajax($.extend({}, @defaults, defaults, params))

class App.Auth extends App.Ajax
  constructor: ->
    console.log 'auth'

  login: (params) ->
    console.log 'login(...)', params
    @ajax(
#      params,
      type:   'POST',
      url:     '/signin',

       
        # empty session
        window.Session = {}
    )

  @logout: ->
    console.log 'logout(...)'
    App.Com.ajax(
      id:   'logout',
      type: 'DELETE',
      url:  '/signout',
    )

class App.i18n

  constructor: ->
    @locale = 'de'
