I had to set up 2 factor security as well. Each code only works once for any login. You can choose which browsers to set it up on.
If it doesn't work, request another code and only use it on one login attempt. Put your regular Amazon password and add the security code after the password with NO spaces.