       currentUser.authenticationToken = response.auth_token
       saveCurrentUser()
 
-      $timeout (( ) -> updateAuth "#{DoubtfireConstants.API_URL}/auth/#{currentUser.authenticationToken}.json"), 1000*60*60
+      $timeout (( ) -> updateAuth "#{DoubtfireConstants.API_URL}/auth"), 1000*60*60
     )
 
   # Private factory methods.

    ).error error

  auth.signOut = () ->
    if currentUser?.authenticationToken?
      $http.delete("#{DoubtfireConstants.API_URL}/auth/#{currentUser.authenticationToken}.json")

    tryChangeUser defaultAnonymousUser
    $rootScope.$broadcast "signOut"
    localStorageService.remove(usernameCookie)
    localStorageService.set(rememberDoubtfireCredentialsCookie, false)
    localStorageService.remove(doubtfireLoginTimeCookie)

  # If the user is logged in then check if we should update their token
  if checkAuth()

        role: response.user.system_role
        profile: response.user

      $timeout (( ) -> updateAuth "#{DoubtfireConstants.API_URL}/auth"), 1000*60*60

      if tryChangeUser user
        success()
