Hi Shibu,
The classes depend on what you're actually trying to do.
If you want the webservice-level, you might want to go for org.alfresco.web.site.SlingshotUserFactory.
If you want the global login class, have a look at org.alfresco.repo.web.scripts.bean.LoginPost
If you want the deep-down mechanisms, then it depends if you use NTML; LDAP, etc.
Check the classes there: org.alfresco.repo.security.authentication.*
Hope it helps.