for the stored procedure you can use
CREATE PROCEDURE [dbo].[SE_SelSecUserCredentials]
@UserName NVARCHAR(45),
@PassWord NVARCHAR(45)
AS
begin
SELECT
thefiels or count you need
FROM
UserTable
WHERE loginName = @UserName
AND BINARY_CHECKSUM(password) = BINARY_CHECKSUM(@PassWord)
end
We do a
Binary_Checksum
on the password to keep up with capitals in the password. a lower case for a capital will not give you a result (a in binary is different value than A)