 window.SammyApp = Sammy '#app', (n) ->
     @get('^/tests/inner', (cx) -> VM.loadJasmineTests(cx))
 
-    if VM.login
+    if VM.current_user
       @get '^/', (cx) => VM.loadDashboard(cx)
     else
       @get "^/", (cx) => VM.home.display(cx)

    @admin = ko.observable()
    @refreshing_projects = ko.observable(false);

    if @login
      @billing = ko.observable(new CI.inner.Billing)
      @current_user = ko.observable(new CI.inner.User @login)
      @pusher = new CI.Pusher @login
      _kmq.push ['identify', @login]

    @intercomUserLink = @komp =>
      @build() and @build() and @projects() # make it update each time the URL changes

    @error_message = ko.observable(null)

    # inner
    @build = ko.observable()
    @builds = ko.observableArray()
    @project = ko.observable()
