module.exports = function(){
	return {
		restrict: 'A',
    templateUrl: './partials/userDetails.html',
		controller: function($scope, Auth){
      $scope.user = null;
      
      Auth.on('login', function(user){
        $scope.user = {
          username: user.username,
          avatar: user.thirdPartyUserData.avatar_url
        };
        window.location.replace('#/projects');
      })
    }
		
	}
}