This is based on http://www.jvandemo.com/learn-how-to-make-authentication-in-your-angular-applications-simpler-and-more-consistent/ Role management added additionally.
This is built based on best practices provided in https://github.com/johnpapa/angular-styleguide#resolving-promises-for-a-controller
This module uses https://github.com/grevory/angular-local-storage to store session data