Authentication fragment for angularjs application