Fixed get public communities sample for better UI, removed 403 error
code as a check to show login page in endpoint.js