1- I want to trigger an auto-action (code) for redirect after another auto-action (login/logout).But when first starts, the second doesn't run!
first auto-action should be in type of code, because i want get URL from cookie and then redirect to that URL
The Login/Logout auto action immediately triggers a redirect after it logs in or logs out. You should be able to just set the redirect parameter in your auto action to [cookie_KEY] to grab that in a single auto action. Aside from that ensure the redirect parameter in your Login/Logout action is empty so it won't try to redirect or act on the after login or after logout triggers with your second action.
2- Is there any substitutions to get a specific cookie value by key?
Yes, use [cookie_KEY] to access cookie values from a substitution.