$q promises + chaining thens after resolve