Wordpress Plugin for Authentication and Authorization?
This sounds like you will need custom code, however the Membership plugin may be helpful to you: http://wordpress.org/extend/plugins/membership/ and the paid version has more options to limit access to content: http://premium.wpmudev.org/project/membership/