Index: modules/uoa-services-library/trunk/ng-openaire-library/src/app/services/user-management.service.ts
===================================================================
--- modules/uoa-services-library/trunk/ng-openaire-library/src/app/services/user-management.service.ts	(revision 57546)
+++ modules/uoa-services-library/trunk/ng-openaire-library/src/app/services/user-management.service.ts	(revision 57547)
@@ -14,7 +14,9 @@
 
   public getUserInfo(url: string): Observable<User> {
     const token = COOKIE.getCookie('AccessToken');
-    return this.http.get<User>(url + token).pipe(map(userInfo => {
+    if(!token) {
+      return of(null);
+    } else return this.http.get<User>(url + token).pipe(map(userInfo => {
       return this.parseUserInfo(userInfo);
     })).pipe(timeout(2000), catchError(() => {
       return of(null);
Index: modules/uoa-services-library/trunk/ng-openaire-library/src/app/connect/communityGuard/isCommunityOrAdmin.ts
===================================================================
--- modules/uoa-services-library/trunk/ng-openaire-library/src/app/connect/communityGuard/isCommunityOrAdmin.ts	(revision 57546)
+++ modules/uoa-services-library/trunk/ng-openaire-library/src/app/connect/communityGuard/isCommunityOrAdmin.ts	(revision 57547)
@@ -19,7 +19,7 @@
       return true;
     } else {
       const obs = this.propertiesService.subscribeEnvironment().pipe(mergeMap(properties => {
-        return typeof document !== 'undefined' && this.userManagementService.getUserInfo(properties['userInfoUrl']).pipe(map(user => {
+        return this.userManagementService.getUserInfo(properties['userInfoUrl']).pipe(map(user => {
           return Session.isPortalAdministrator(user);
         }));
       }));
Index: modules/uoa-services-library/trunk/ng-openaire-library/src/app/connect/communityGuard/connectSubscriber.guard.ts
===================================================================
--- modules/uoa-services-library/trunk/ng-openaire-library/src/app/connect/communityGuard/connectSubscriber.guard.ts	(revision 57546)
+++ modules/uoa-services-library/trunk/ng-openaire-library/src/app/connect/communityGuard/connectSubscriber.guard.ts	(revision 57547)
@@ -21,7 +21,7 @@
      let errorCode = LoginErrorCodes.NOT_LOGIN;
      let email = null;
      const subscribed = this.propertiesService.subscribeEnvironment().pipe(map(res => res), mergeMap(properties => {
-       return typeof document !== 'undefined' && this.userManagementService.getUserInfo(properties.userInfoUrl).pipe(map(user => {
+       return this.userManagementService.getUserInfo(properties.userInfoUrl).pipe(map(user => {
          if (user) {
            errorCode = LoginErrorCodes.NOT_SUBSCRIBER;
            email = user.email;
Index: modules/uoa-services-library/trunk/ng-openaire-library/src/app/connect/communityGuard/connectAdminLoginGuard.guard.ts
===================================================================
--- modules/uoa-services-library/trunk/ng-openaire-library/src/app/connect/communityGuard/connectAdminLoginGuard.guard.ts	(revision 57546)
+++ modules/uoa-services-library/trunk/ng-openaire-library/src/app/connect/communityGuard/connectAdminLoginGuard.guard.ts	(revision 57547)
@@ -28,7 +28,7 @@
     let errorCode = LoginErrorCodes.NOT_LOGIN;
     let email = null;
     const authorized = this.propertiesService.subscribeEnvironment().pipe(map(res => res), mergeMap(properties => {
-      return typeof document !== 'undefined' &&  this.userManagementService.getUserInfo(properties.userInfoUrl).pipe(map(user => {
+      return this.userManagementService.getUserInfo(properties.userInfoUrl).pipe(map(user => {
         if (user) {
           email = user.email;
           if (Session.isPortalAdministrator(user) || Session.isCommunityCurator(user)) {
Index: modules/uoa-services-library/trunk/ng-openaire-library/src/app/utils/subscribe/subscribe.service.ts
===================================================================
--- modules/uoa-services-library/trunk/ng-openaire-library/src/app/utils/subscribe/subscribe.service.ts	(revision 57546)
+++ modules/uoa-services-library/trunk/ng-openaire-library/src/app/utils/subscribe/subscribe.service.ts	(revision 57547)
@@ -7,41 +7,45 @@
 @Injectable()
 export class SubscribeService {
 
-  constructor(private http:HttpClient) {
-    }
-     getCommunitySubscribers(properties: EnvProperties, pid:string){
-       let url = properties.adminToolsAPIURL+ "/community/"+pid+"/subscribers";
-       return this.http.get<any>((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url);
-     }
+  constructor(private http: HttpClient) {
+  }
 
-     isSubscribedToCommunity(properties: EnvProperties, pid:string, email:string){
-       let url = properties.adminToolsAPIURL + "/community/"+pid+"/subscribers";
-       return this.http.get((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
-         .pipe(map(res => {
-                         if(res['status'] && res['status'] != 200) {
-                           return null;
-                         }
-                         if(res['subscribers'] && res['subscribers'] != null){
+  getCommunitySubscribers(properties: EnvProperties, pid: string) {
+    let url = properties.adminToolsAPIURL + "/community/" + pid + "/subscribers";
+    return this.http.get<any>((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url);
+  }
 
-                           for(var i =0; i< res['subscribers'].length; i++ ){
-                             if(res['subscribers'][i]!=null && res['subscribers'][i].email == email){
-                               return true;
-                             }
-                           }
-                         }
-                         return false;
+  isSubscribedToCommunity(properties: EnvProperties, pid: string, email: string) {
+    let url = properties.adminToolsAPIURL + "/community/" + pid + "/subscribers";
+    return this.http.get((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
+      .pipe(map(res => {
+        if (res['status'] && res['status'] != 200) {
+          return null;
+        }
+        if (res['subscribers'] && res['subscribers'] != null) {
 
-                       }));
-     }
-     subscribeToCommunity(pid:string, email:string, url:string){
-       let subscriber = {"email":email};
-       return this.http.post<any>(url+"/community/"+pid+"/subscribers", JSON.stringify(subscriber), CustomOptions.getAuthOptionsWithBody());
-     }
-     unSubscribeToCommunity(pid:string, email:string, url:string){
-       return this.http.post<any>(url+"/community/"+pid+"/subscribers/delete", JSON.stringify([email]),  CustomOptions.getAuthOptionsWithBody());
-     }
-     getCommunitiesSubscribedTo(properties: EnvProperties, email:string){
-      let url = properties.adminToolsAPIURL+"/subscriber/communities?email="+email;
-      return this.http.get<any>((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url);
-     }
+          for (var i = 0; i < res['subscribers'].length; i++) {
+            if (res['subscribers'][i] != null && res['subscribers'][i].email == email) {
+              return true;
+            }
+          }
+        }
+        return false;
+
+      }));
+  }
+
+  subscribeToCommunity(pid: string, email: string, url: string) {
+    let subscriber = {"email": email};
+    return this.http.post<any>(url + "/community/" + pid + "/subscribers", JSON.stringify(subscriber), CustomOptions.getAuthOptionsWithBody());
+  }
+
+  unSubscribeToCommunity(pid: string, email: string, url: string) {
+    return this.http.post<any>(url + "/community/" + pid + "/subscribers/delete", JSON.stringify([email]), CustomOptions.getAuthOptionsWithBody());
+  }
+
+  getCommunitiesSubscribedTo(properties: EnvProperties, email: string) {
+    let url = properties.adminToolsAPIURL + "/subscriber/communities?email=" + email;
+    return this.http.get<any>((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url);
+  }
 }
Index: modules/uoa-services-library/trunk/ng-openaire-library/src/app/login/claimsCuratorGuard.guard.ts
===================================================================
--- modules/uoa-services-library/trunk/ng-openaire-library/src/app/login/claimsCuratorGuard.guard.ts	(revision 57546)
+++ modules/uoa-services-library/trunk/ng-openaire-library/src/app/login/claimsCuratorGuard.guard.ts	(revision 57547)
@@ -26,7 +26,7 @@
   check(path: string): Observable<boolean> |boolean {
     let errorCode = LoginErrorCodes.NOT_LOGIN;
     const obs = this.propertiesService.subscribeEnvironment().pipe(mergeMap(properties => {
-      return typeof document !== 'undefined' && this.userManagementService.getUserInfo(properties['userInfoUrl']).pipe(map( user => {
+      return this.userManagementService.getUserInfo(properties['userInfoUrl']).pipe(map( user => {
         if(user) {
           errorCode = LoginErrorCodes.NOT_ADMIN;
         }
Index: modules/uoa-services-library/trunk/ng-openaire-library/src/app/login/adminLoginGuard.guard.ts
===================================================================
--- modules/uoa-services-library/trunk/ng-openaire-library/src/app/login/adminLoginGuard.guard.ts	(revision 57546)
+++ modules/uoa-services-library/trunk/ng-openaire-library/src/app/login/adminLoginGuard.guard.ts	(revision 57547)
@@ -26,7 +26,7 @@
   check(path: string): Observable<boolean>  {
     let errorCode = LoginErrorCodes.NOT_LOGIN;
     const obs = this.propertiesService.subscribeEnvironment().pipe(mergeMap(properties => {
-      return typeof document !== 'undefined' && this.userManagementService.getUserInfo(properties['userInfoUrl']).pipe(map( user => {
+      return this.userManagementService.getUserInfo(properties['userInfoUrl']).pipe(map( user => {
         if(user) {
           errorCode = LoginErrorCodes.NOT_ADMIN;
         }
Index: modules/uoa-services-library/trunk/ng-openaire-library/src/app/claims/claimsAdmin/claimsAdmin.component.ts
===================================================================
--- modules/uoa-services-library/trunk/ng-openaire-library/src/app/claims/claimsAdmin/claimsAdmin.component.ts	(revision 57546)
+++ modules/uoa-services-library/trunk/ng-openaire-library/src/app/claims/claimsAdmin/claimsAdmin.component.ts	(revision 57547)
@@ -1,19 +1,19 @@
-import {Component, Input}  from '@angular/core';
-import {Title, Meta}                  from '@angular/platform-browser';
+import {Component, Input} from '@angular/core';
+import {Title, Meta} from '@angular/platform-browser';
 import {User} from "../../login/utils/helper.class";
 import {UserManagementService} from "../../services/user-management.service";
 
 
 @Component({
-    selector: 'claims-admin',
-    template: `
+  selector: 'claims-admin',
+  template: `
 
-    <div id="tm-main" [class]="((isConnect)?'':'uk-section') +'   uk-padding-remove-top tm-middle'"   >
+    <div id="tm-main" [class]="((isConnect)?'':'uk-section') +'   uk-padding-remove-top tm-middle'">
       <div uk-grid uk-grid>
-       <div class="tm-main uk-width-1-1@s uk-width-1-1@m  uk-width-1-1@l uk-row-first ">
+        <div class="tm-main uk-width-1-1@s uk-width-1-1@m  uk-width-1-1@l uk-row-first ">
           <div class="uk-container">
             <div class="uk-article-title custom-article-title">
-                Manage links
+              Manage links
             </div>
             <div>
               <!--div class="uk-text-right">
@@ -21,9 +21,9 @@
               <a  *ngIf="isConnect && fetchBy && fetchBy == 'Context' && externalPortalUrl" [href]="externalPortalUrl+'/participate/claim'"  target="_blank">Claim more links?</a>              
               </div-->
               <displayClaims *ngIf="user" [user]="user" [enableDelete]=true [myClaims]=false
-                             [isAdmin]=true [fetchBy]= "(fetchId=='openaire')?null:fetchBy"
+                             [isAdmin]=true [fetchBy]="(fetchId=='openaire')?null:fetchBy"
                              [fetchId]="(fetchId=='openaire')?null:fetchId"
-                            [communityId]="(fetchBy && fetchBy == 'Context' && fetchId && fetchId!='openaire')?fetchId:null"
+                             [communityId]="(fetchBy && fetchBy == 'Context' && fetchId && fetchId!='openaire')?fetchId:null"
                              [externalPortalUrl]=externalPortalUrl [claimsInfoURL]=claimsInfoURL
                              title="Manage links"></displayClaims>
             </div>
@@ -32,24 +32,24 @@
       </div>
     </div>
 
-    `,
+  `,
 
 })
 export class ClaimsAdminComponent {
-  @Input() fetchBy:string;
-  @Input() fetchId:string;
-  @Input() isConnect:boolean = false;
-  @Input() externalPortalUrl:string;
-  @Input() claimsInfoURL:string;
+  @Input() fetchBy: string;
+  @Input() fetchId: string;
+  @Input() isConnect: boolean = false;
+  @Input() externalPortalUrl: string;
+  @Input() claimsInfoURL: string;
   @Input() userInfoURL: string;
   public user: User = null;
 
-  constructor ( private _meta: Meta, private _title: Title,
-                private userManagementService: UserManagementService) {
+  constructor(private _meta: Meta, private _title: Title,
+              private userManagementService: UserManagementService) {
     var titleConnect = "OpenAIRE Connect | Manage links ";
     var title = "OpenAIRE | Manage links ";
 
-    if(this.isConnect) {
+    if (this.isConnect) {
       this._title.setTitle(titleConnect);
     } else {
       this._title.setTitle(title);
@@ -57,11 +57,10 @@
 
 
   }
+
   ngOnInit() {
-    if (typeof document !== 'undefined') {
-      this.userManagementService.getUserInfo(this.userInfoURL).subscribe(user => {
-        this.user = user;
-      });
-    }
+    this.userManagementService.getUserInfo(this.userInfoURL).subscribe(user => {
+      this.user = user;
+    });
   }
 }
