 
     $scope.message = ""
     $scope.loggedIn = $scope.getUsername()
-    $scope.getUsername()
     return
 ]

app = angular.module 'playlistApp'

app.controller 'AuthCtrl', ['$scope', '$http', '$window', 'APIBase', ($scope, $http, $window, APIBase) ->
    $scope.getUsername = ->
        $http(
            method: 'GET'

                return
        return

    $scope.logout = ->
        $scope.loggedIn = false
        $scope.username = undefined
        delete($window.sessionStorage.token)        

    $scope.register = (user) ->
        $http(
            method: 'POST'
