Migrated from ng-routes to ui-router and added loading bar