I would probably change this to

```JavaScript
if($location.path() != '/login' && !AuthService.getCurrentUserId()){
    $location.path('/login');
}
```

and remove the `LOGIN_URI` constant.