 	<cfargument name="pluginName">
 	<cfargument name="lang" type="string" default="#session.lucee_admin_lang#">
 
-    <cfset var fileLanguage="#pluginDir#/#pluginName#/language.xml">
-    <cfif arguments.lang EQ "en">
+	<cfset var fileLanguage="#pluginDir#/#pluginName#/language.xml">
+	<cfif arguments.lang EQ "en">
 		<cfset var language=struct(__action:'plugin',title:ucFirst(pluginName),text:'')>
-    <cfelse>
-    	<cfset var language=loadPluginLanguage(arguments.pluginDir,arguments.pluginName,'en')>
+	<cfelse>
+		<cfset var language=loadPluginLanguage(arguments.pluginDir,arguments.pluginName,'en')>
 	</cfif>
 	<cfset var txtLanguage="">
-    <cfset var xml="">
+	<cfset var xml="">
 
 	<cfif fileExists(fileLanguage)>
 		<cffile action="read" file="#fileLanguage#" variable="txtLanguage" charset="utf-8">
 		<cfxml casesensitive="no" variable="xml"><cfoutput>#txtLanguage#</cfoutput></cfxml>
-        <cfset language.__position=0>
-        <cfif isDefined('xml.xmlRoot.XmlAttributes.action')>
-        	<cfset language.__action=trim(xml.xmlRoot.XmlAttributes.action)>
-        	<cfset language.__position=StructKeyExists(xml.xmlRoot.XmlAttributes,"position")?xml.xmlRoot.XmlAttributes.position:0>
-        </cfif>
-        <cftry>
+		<cfset language.__position=0>
+		<cfif isDefined('xml.xmlRoot.XmlAttributes.action')>
+			<cfset language.__action=trim(xml.xmlRoot.XmlAttributes.action)>
+			<cfset language.__position=StructKeyExists(xml.xmlRoot.XmlAttributes,"position")?xml.xmlRoot.XmlAttributes.position:0>
+		</cfif>
+		<cftry>
 				<cfset xml = XmlSearch(xml, "/languages/language[@key='#lCase(trim(arguments.lang))#']")[1]>
 			<cfcatch>
 				<!--- fallback to english --->
 				<cfset xml = XmlSearch(xml, "/languages/language[@key='en']")[1]>
 			</cfcatch>
 		</cftry>
-        
-        
+
 		<cfset language.__group=StructKeyExists(xml,"group")?xml.group.XmlText:UCFirst(language.__action)>
 		<cfset language.title=xml.title.XmlText>
 		<cfset language.text=xml.description.XmlText>

<!--- Form --->
<cfif StructKeyExists(form,"login_password"&request.adminType)>
	<cfadmin
        action="getLoginSettings"
        type="#request.adminType#"
   		returnVariable="loginSettings">

	<cfset loginPause=loginSettings.delay>



	<cfif loginPause and StructKeyExists(application,'lastTryToLogin') and IsDate(application.lastTryToLogin) and DateDiff("s",application.lastTryToLogin,now()) LT loginPause>
    	<cfset login_error="Login disabled until #lsDateFormat(DateAdd("s",loginPause,application.lastTryToLogin))# #lsTimeFormat(DateAdd("s",loginPause,application.lastTryToLogin),'hh:mm:ss')#">
    <cfelse>
        <cfset application.lastTryToLogin=now()>
        <cfparam name="form.captcha" default="">

        <cfif loginSettings.captcha and structKeyExists(session,"cap") and compare(form.captcha,session.cap) NEQ 0>
    		<cfset login_error="Invalid security code (captcha) definition">

        <cfelse>
        	<cfadmin
			    action="hashPassword"
			    type="#request.adminType#"
			    pw="#form["login_password"&ad]#"
				returnVariable="hashedPassword">
			<cfset session["password"&request.adminType]=hashedPassword>
            <cfset session.lucee_admin_lang=form.lang>
            <!--- Thread operation for update provider --->
            <cfcookie expires="NEVER" name="lucee_admin_lang" value="#session.lucee_admin_lang#">
            <cfif form.rememberMe NEQ "s">
                <cfcookie
                	expires="#DateAdd(form.rememberMe,1,now())#"
                	name="lucee_admin_pw_#server.lucee.version#_#ad#"
                	value="#hashedPassword#">
            <cfelse>
                <cfcookie expires="Now" name="lucee_admin_pw_#server.lucee.version#_#ad#" value="">
            </cfif>
            <cfif isDefined("cookie.lucee_admin_lastpage") and cookie.lucee_admin_lastpage neq "logout">
                <cfset url.action = cookie.lucee_admin_lastpage>
            </cfif>
        </cfif>
    </cfif>
</cfif>


<!--- new pw Form --->
<cfif StructKeyExists(form,"new_password") and StructKeyExists(form,"new_password_re")>
	<cfif len(form.new_password) LT 6>
		<cfset login_error="password is too short, it must have at least 6 chars">

	</cfsavecontent>

	<cfif request.disableFrame>
		<cfoutput>#content#</cfoutput>
	<cfelse>
		<cfhtmlbody>
			<script type="text/javascript">
				$(function() {
