copy authentication logic from Superdesk

https://github.com/superdesk/superdesk-client/tree/b730b029c41c0a6503fb58b3d53d7c35a6dc4587/app/scripts/superdesk/auth
use the public address for a dependency