Just follow these tutorials below regarding how to implement WebParts in ASP.NET based on different Authentication mode.
WEBPART with Windows Authentication
WEBPART with Anonymous Users
WEBPART with FORM Authentication
Good Luck!
Technorati Tags:
ASP.NET,
WebParts