I did a little Googling and I came accross this promising code
System.DirectoryServices.AccountManagement.PrincipalContext pc = new System.DirectoryServices.AccountManagement.PrincipalContext(ContextType.Domain, "YOURDOMAIN")
// validate the credentials
bool validatedOnDomain = pc.ValidateCredentials(userName, tb.Text.ToString());
userName is initialized as the Windows login name. It's also a string tb.Text.ToString() is the textbox that is being used for typing the password
Updated code and it's working. Thanks all
MSDN says that PrincipalContext can use two arguments