         useSegment = 'login'
 
     useSegment
-
-  $scope.$on '$locationChangeStart', (e) ->
-    segment = window.segmentForURL $location.path()
-    useSegment = validateLocationChange segment
-    $scope.log.debug "segment=#{segment}, useSegment=#{useSegment}"
-    if useSegment isnt segment
-      e.preventDefault()
-      $scope.redirectToSegment useSegment
 
   userPromise        = pwgCheckUser.checkUser()
   browserInfoPromise = pwgGetBrowserInfo.getBrowserInfo()

    # Clear flash messages on route change.
    pwgFlash.clear 'all'

  # Page-handling.

  # Convenient way to show a page/segment

    url = $scope.pathForSegment segment
    if url?
      $scope.log.debug "Redirecting to #{url}"
      $scope.log.debug (new Error("trace").stack)
      $location.path(url)
    else
      console.log "(BUG) No URL for segment #{segment}"
