Here is a good example that you can use.
Here is a link to the source code. Right click to view.
http://view.myhomesmart.com/singleton/singleton.html
Here is the cfc code.
<cffunction name="Do_Login" access="remote" output="false"
returntype="struct">
<cfargument name="username" type="string" required="true"/>
<cfargument name="userpass" type="string" required="true"/>
<cfset var rtnStc = structNew()>
<cfquery name="GetUser" datasource="#dsn#">
SELECT
tbl_smartPanel_User.fld_user_UUID,
tbl_smartPanel_User.fld_user_Username,
concat(tbl_smartPanel_User_Detail.fld_userDetails_FirstName, ' ' ,
tbl_smartPanel_User_Detail.fld_userDetails_LastName) AS fullName
FROM
tbl_smartPanel_User
Inner Join tbl_smartPanel_User_Detail ON
tbl_smartPanel_User.fld_user_UUID = tbl_smartPanel_User_Detail.fld_user_UUID
WHERE
tbl_smartPanel_User.fld_user_Username =
<cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.username#"/>
AND
tbl_smartPanel_User.fld_user_Password =
<cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.userpass#"/>
</cfquery>
<cfif GetUser.recordCount gt 0>
<cfset rtnStc.username =
GetUser.fld_user_Username>
<cfset rtnStc.fullname = GetUser.fullName>
<cfset rtnStc.userid = GetUser.fld_user_UUID>
<cfelse>
<cfset rtnStc.msg = "FAILED">
</cfif>
<cfreturn rtnStc />
</cffunction>