set up auth by angularjs