There is a feature to do this and it's called Lock & Key or Dynamic Access-List. The idea for this feature is every user (or each IP Address) that want to pass through the router have to telnet it first and have to pass the login and the password. After the user passed the authentication (note : Authentication can be locally or using AAA method such as Radius or TACACS+), The user will be automatically logout and the router will create the dynamic port opened to pass the user traffic to the core network (or to go to your firewall). You can also set the timer for the port opened to the user.
You could check it out at Cisco Documentation :
http://www.cisco.com/univercd/cc/td/doc/product/software/ios120/12cgcr/secur_c/scprt3/sclock.htm