     )
 
 angular.module('holmesApp')
-  .service('AuthSrvc', ($rootScope, $cookies, $location, Restangular, GooglePlus, $localStorage, UserViolationsPrefsFcty, WebSocketFcty) ->
-    return new AuthService($rootScope, $cookies, $location, Restangular, GooglePlus, $localStorage, UserViolationsPrefsFcty)
+  .service('AuthSrvc', ($rootScope, $location, Restangular, GooglePlus, $localStorage, UserViolationsPrefsFcty, WebSocketFcty) ->
+    return new AuthService($rootScope, $location, Restangular, GooglePlus, $localStorage, UserViolationsPrefsFcty)
   )

    if @rootScope.isSuperUser is false
      @location.url path

  removeAuthCookie: ->
    delete @cookies[@cookieName]

  logout: ->
    @rootScope.isLoggedIn = false
    @removeAuthCookie()
    @location.url "/login"

  googleLogin: ->
    @googlePlus.login().then((authResult) =>


  getAuthentication: ->
    @restangular.one('authenticate').get()

  removeAuthentication: ->
    @restangular.one('authenticate').remove()

  authenticate: (data) ->
    @restangular.all('authenticate').post(data)
