Started working on authentication handling within angularjs controllers.