diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php
index 0f8efb23da0dd421e2e8cdfbedc81a9a1ae6f2d6..d73f23d0ef709e0a5e8447468afa1d354e731b93 100644
--- a/htdocs/admin/company.php
+++ b/htdocs/admin/company.php
@@ -31,6 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
@@ -51,8 +52,6 @@ $error=0;
 if ( ($action == 'update' && empty($_POST["cancel"]))
 || ($action == 'updateedit') )
 {
-	require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
-
 	$tmparray=getCountry(GETPOST('country_id','int'),'all',$db,$langs,0);
 	if (! empty($tmparray['id']))
 	{
@@ -76,21 +75,23 @@ if ( ($action == 'update' && empty($_POST["cancel"]))
 	dolibarr_set_const($db, "MAIN_INFO_SOCIETE_WEB",$_POST["web"],'chaine',0,'',$conf->entity);
 	dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOTE",$_POST["note"],'chaine',0,'',$conf->entity);
 	dolibarr_set_const($db, "MAIN_INFO_SOCIETE_GENCOD",$_POST["barcode"],'chaine',0,'',$conf->entity);
-	if ($_FILES["logo"]["tmp_name"])
+	
+	$varforimage='logo'; $dirforimage=$conf->mycompany->dir_output.'/logos/';
+	if ($_FILES[$varforimage]["tmp_name"])
 	{
-		if (preg_match('/([^\\/:]+)$/i',$_FILES["logo"]["name"],$reg))
+		if (preg_match('/([^\\/:]+)$/i',$_FILES[$varforimage]["name"],$reg))
 		{
 			$original_file=$reg[1];
 
 			$isimage=image_format_supported($original_file);
 			if ($isimage >= 0)
 			{
-				dol_syslog("Move file ".$_FILES["logo"]["tmp_name"]." to ".$conf->mycompany->dir_output.'/logos/'.$original_file);
-				if (! is_dir($conf->mycompany->dir_output.'/logos/'))
+				dol_syslog("Move file ".$_FILES[$varforimage]["tmp_name"]." to ".$dirforimage.$original_file);
+				if (! is_dir($dirforimage))
 				{
-					dol_mkdir($conf->mycompany->dir_output.'/logos/');
+					dol_mkdir($dirforimage);
 				}
-				$result=dol_move_uploaded_file($_FILES["logo"]["tmp_name"],$conf->mycompany->dir_output.'/logos/'.$original_file,1,0,$_FILES['logo']['error']);
+				$result=dol_move_uploaded_file($_FILES[$varforimage]["tmp_name"],$dirforimage.$original_file,1,0,$_FILES[$varforimage]['error']);
 				if ($result > 0)
 				{
 					dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO",$original_file,'chaine',0,'',$conf->entity);
@@ -101,8 +102,8 @@ if ( ($action == 'update' && empty($_POST["cancel"]))
 					    // Create thumbs
 					    //$object->addThumbs($newfile);    // We can't use addThumbs here yet because we need name of generated thumbs to add them into constants. TODO Check if need such constants. We should be able to retreive value with get... 
 					    	
-						// Used on logon for example
-						$imgThumbSmall = vignette($conf->mycompany->dir_output.'/logos/'.$original_file, $maxwidthsmall, $maxheightsmall, '_small', $quality);
+						// Create small thumb, Used on logon for example
+						$imgThumbSmall = vignette($dirforimage.$original_file, $maxwidthsmall, $maxheightsmall, '_small', $quality);
 						if (image_format_supported($imgThumbSmall) >= 0 && preg_match('/([^\\/:]+)$/i',$imgThumbSmall,$reg))
 						{
 							$imgThumbSmall = $reg[1];    // Save only basename
@@ -110,9 +111,8 @@ if ( ($action == 'update' && empty($_POST["cancel"]))
 						}
 						else dol_syslog($imgThumbSmall);
 
-						// Create mini thumbs for company (Ratio is near 16/9)
-						// Used on menu or for setup page for example
-						$imgThumbMini = vignette($conf->mycompany->dir_output.'/logos/'.$original_file, $maxwidthmini, $maxheightmini, '_mini', $quality);
+						// Create mini thumb, Used on menu or for setup page for example
+						$imgThumbMini = vignette($dirforimage.$original_file, $maxwidthmini, $maxheightmini, '_mini', $quality);
 						if (image_format_supported($imgThumbMini) >= 0 && preg_match('/([^\\/:]+)$/i',$imgThumbMini,$reg))
 						{
 							$imgThumbMini = $reg[1];     // Save only basename
@@ -143,6 +143,7 @@ if ( ($action == 'update' && empty($_POST["cancel"]))
 			}
 		}
 	}
+	
 	dolibarr_set_const($db, "MAIN_INFO_SOCIETE_MANAGERS",$_POST["MAIN_INFO_SOCIETE_MANAGERS"],'chaine',0,'',$conf->entity);
 	dolibarr_set_const($db, "MAIN_INFO_CAPITAL",$_POST["capital"],'chaine',0,'',$conf->entity);
 	dolibarr_set_const($db, "MAIN_INFO_SOCIETE_FORME_JURIDIQUE",$_POST["forme_juridique_code"],'chaine',0,'',$conf->entity);
@@ -196,7 +197,7 @@ if ( ($action == 'update' && empty($_POST["cancel"]))
 	}
 }
 
-if ($action == 'addthumb')
+if ($action == 'addthumb')  // Regenerate thumbs
 {
 	if (file_exists($conf->mycompany->dir_output.'/logos/'.$_GET["file"]))
 	{
@@ -208,7 +209,7 @@ if ($action == 'addthumb')
 		    // Create thumbs
 		    //$object->addThumbs($newfile);    // We can't use addThumbs here yet because we need name of generated thumbs to add them into constants. TODO Check if need such constants. We should be able to retreive value with get... 
 
-			// Used on logon for example
+			// Create small thumb. Used on logon for example
 			$imgThumbSmall = vignette($conf->mycompany->dir_output.'/logos/'.$_GET["file"], $maxwidthsmall, $maxheightsmall, '_small',$quality);
 			if (image_format_supported($imgThumbSmall) >= 0 && preg_match('/([^\\/:]+)$/i',$imgThumbSmall,$reg))
 			{
@@ -217,8 +218,7 @@ if ($action == 'addthumb')
 			}
 			else dol_syslog($imgThumbSmall);
 
-			// Create mini thumbs for company (Ratio is near 16/9)
-			// Used on menu or for setup page for example
+			// Create mini thumbs. Used on menu or for setup page for example
 			$imgThumbMini = vignette($conf->mycompany->dir_output.'/logos/'.$_GET["file"], $maxwidthmini, $maxheightmini, '_mini',$quality);
 			if (image_format_supported($imgThumbSmall) >= 0 && preg_match('/([^\\/:]+)$/i',$imgThumbMini,$reg))
 			{
@@ -300,7 +300,7 @@ if ($action == 'edit' || $action == 'updateedit')
 		  });';
 	print '</script>'."\n";
 
-	print '<form enctype="multipart/form-data" method="post" action="'.$_SERVER["PHP_SELF"].'" name="form_index">';
+	print '<form enctype="multipart/form-data" method="POST" action="'.$_SERVER["PHP_SELF"].'" name="form_index">';
 	print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
 	print '<input type="hidden" name="action" value="update">';
 	$var=true;
@@ -383,7 +383,7 @@ if ($action == 'edit' || $action == 'updateedit')
 		print '<a href="'.$_SERVER["PHP_SELF"].'?action=removelogo">'.img_delete($langs->trans("Delete")).'</a>';
 		if (file_exists($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) {
 			print ' &nbsp; ';
-			print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode('/thumbs/'.$mysoc->logo_mini).'">';
+			print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;file='.urlencode('/thumbs/'.$mysoc->logo_mini).'">';
 		}
 	} else {
 		print '<img height="30" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png">';
@@ -775,7 +775,7 @@ else
 	}
 	else if ($mysoc->logo_mini && is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini))
 	{
-		print '<img class="img_logo" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode('/thumbs/'.$mysoc->logo_mini).'">';
+		print '<img class="img_logo" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;file='.urlencode('/thumbs/'.$mysoc->logo_mini).'">';
 	}
 	else
 	{
diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php
index 83f6701e2a11ad0a0874d70c874aca87a9e23782..ff3bb89946be21e87de291bc427a78540eaf752b 100644
--- a/htdocs/admin/ihm.php
+++ b/htdocs/admin/ihm.php
@@ -26,6 +26,8 @@
 require '../main.inc.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
@@ -70,6 +72,26 @@ if (GETPOST('cancel'))
     $action='';
 }
 
+if ($action == 'removebackgroundlogin' && ! empty($conf->global->MAIN_LOGIN_BACKGROUND))
+{
+    require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
+
+    $logofile=$conf->mycompany->dir_output.'/logos/'.$conf->global->MAIN_LOGIN_BACKGROUND;
+    dol_delete_file($logofile);
+    dolibarr_del_const($db, "MAIN_LOGIN_BACKGROUND",$conf->entity);
+    $mysoc->logo='';
+
+    /*$logosmallfile=$conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small;
+    dol_delete_file($logosmallfile);
+    dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO_SMALL",$conf->entity);
+    $mysoc->logo_small='';
+
+    $logominifile=$conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini;
+    dol_delete_file($logominifile);
+    dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO_MINI",$conf->entity);
+    $mysoc->logo_mini='';*/
+}
+
 if ($action == 'update')
 {
 	dolibarr_set_const($db, "MAIN_LANG_DEFAULT",				$_POST["main_lang_default"],'chaine',0,'',$conf->entity);
@@ -123,6 +145,78 @@ if ($action == 'update')
 	// This one is not always defined
 	if (isset($_POST["MAIN_USE_PREVIEW_TABS"])) dolibarr_set_const($db, "MAIN_USE_PREVIEW_TABS", $_POST["MAIN_USE_PREVIEW_TABS"],'chaine',0,'',$conf->entity);
 
+	$varforimage='imagebackground'; $dirforimage=$conf->mycompany->dir_output.'/logos/';
+	if ($_FILES[$varforimage]["tmp_name"])
+	{
+	    if (preg_match('/([^\\/:]+)$/i',$_FILES[$varforimage]["name"],$reg))
+	    {
+	        $original_file=$reg[1];
+	
+	        $isimage=image_format_supported($original_file);
+	        if ($isimage >= 0)
+	        {
+	            dol_syslog("Move file ".$_FILES[$varforimage]["tmp_name"]." to ".$dirforimage.$original_file);
+	            if (! is_dir($dirforimage))
+	            {
+	                dol_mkdir($dirforimage);
+	            }
+	            $result=dol_move_uploaded_file($_FILES[$varforimage]["tmp_name"],$dirforimage.$original_file,1,0,$_FILES[$varforimage]['error']);
+	            if ($result > 0)
+	            {
+	                dolibarr_set_const($db, "MAIN_LOGIN_BACKGROUND",$original_file,'chaine',0,'',$conf->entity);
+	
+	                // Create thumbs of logo (Note that PDF use original file and not thumbs)
+	                /*
+	                if ($isimage > 0)
+	                {
+	                    // Create thumbs
+	                    //$object->addThumbs($newfile);    // We can't use addThumbs here yet because we need name of generated thumbs to add them into constants. TODO Check if need such constants. We should be able to retreive value with get...
+	
+	                    // Create small thumb, Used on logon for example
+	                    $imgThumbSmall = vignette($dirforimage.$original_file, $maxwidthsmall, $maxheightsmall, '_small', $quality);
+	                    if (image_format_supported($imgThumbSmall) >= 0 && preg_match('/([^\\/:]+)$/i',$imgThumbSmall,$reg))
+	                    {
+	                        $imgThumbSmall = $reg[1];    // Save only basename
+	                        dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO_SMALL",$imgThumbSmall,'chaine',0,'',$conf->entity);
+	                    }
+	                    else dol_syslog($imgThumbSmall);
+	
+	                    // Create mini thumb, Used on menu or for setup page for example
+	                    $imgThumbMini = vignette($dirforimage.$original_file, $maxwidthmini, $maxheightmini, '_mini', $quality);
+	                    if (image_format_supported($imgThumbMini) >= 0 && preg_match('/([^\\/:]+)$/i',$imgThumbMini,$reg))
+	                    {
+	                        $imgThumbMini = $reg[1];     // Save only basename
+	                        dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO_MINI",$imgThumbMini,'chaine',0,'',$conf->entity);
+	                    }
+	                    else dol_syslog($imgThumbMini);
+	                }
+	                else dol_syslog("ErrorImageFormatNotSupported",LOG_WARNING);
+	                */
+	            }
+	            else if (preg_match('/^ErrorFileIsInfectedWithAVirus/',$result))
+	            {
+	                $error++;
+	                $langs->load("errors");
+	                $tmparray=explode(':',$result);
+	                setEventMessages($langs->trans('ErrorFileIsInfectedWithAVirus',$tmparray[1]), null, 'errors');
+	            }
+	            else
+	            {
+	                $error++;
+	                setEventMessages($langs->trans("ErrorFailedToSaveFile"), null, 'errors');
+	            }
+	        }
+	        else
+	        {
+	            $error++;
+	            $langs->load("errors");
+	            setEventMessages($langs->trans("ErrorBadImageFormat"), null, 'errors');
+	        }
+	    }
+	}
+	
+	
+	
 	$_SESSION["mainmenu"]="";   // Le gestionnaire de menu a pu changer
 
 	header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup");
@@ -152,7 +246,7 @@ if ($action == 'edit')	// Edit
     //WYSIWYG Editor
     require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
 
-    print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
+    print '<form enctype="multipart/form-data" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
     print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
     print '<input type="hidden" name="action" value="update">';
 
@@ -160,7 +254,7 @@ if ($action == 'edit')	// Edit
     
     print '<br>';
     print '<table summary="edit" class="noborder" width="100%">';
-    print '<tr class="liste_titre"><td>'.$langs->trans("Parameters").'</td><td>'.$langs->trans("Value").'</td>';
+    print '<tr class="liste_titre"><td>'.$langs->trans("Language").'</td><td></td>';
 	print '<td width="20">&nbsp;</td>';
 	print '</tr>';
 
@@ -315,14 +409,6 @@ if ($action == 'edit')	// Edit
 	print '<td width="20">&nbsp;</td>';
 	print '</tr>';
 	
-	// Message on login page
-    print '<tr><td width="35%">'.$langs->trans("MessageLogin").'</td><td colspan="2">';
-
-    $doleditor = new DolEditor('main_home', (isset($conf->global->MAIN_HOME)?$conf->global->MAIN_HOME:''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%');
-	$doleditor->Create();
-
-	print '</td></tr>'."\n";
-
 	// Message of the day on home page
     print '<tr><td width="35%">'.$langs->trans("MessageOfDay").'</td><td colspan="2">';
 
@@ -333,6 +419,40 @@ if ($action == 'edit')	// Edit
 
 	print '</table>'."\n";
 
+	print '<br>';
+	
+	// Other
+	print '<table summary="edit" class="noborder" width="100%">';
+	print '<tr class="liste_titre"><td width="35%">'.$langs->trans("LoginPage").'</td><td></td>';
+	print '<td width="20">&nbsp;</td>';
+	print '</tr>';
+	
+	// Message on login page
+	print '<tr><td>'.$langs->trans("MessageLogin").'</td><td colspan="2">';
+	$doleditor = new DolEditor('main_home', (isset($conf->global->MAIN_HOME)?$conf->global->MAIN_HOME:''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%');
+	$doleditor->Create();
+	print '</td></tr>'."\n";
+	
+	// Logo
+	$var=!$var;
+	print '<tr'.dol_bc($var,'hideonsmartphone').'><td><label for="imagebackground">'.$langs->trans("BackgroundImageLogin").' (png,jpg)</label></td><td colspan="2">';
+	print '<table width="100%" class="nobordernopadding"><tr class="nocellnopadd"><td valign="middle" class="nocellnopadd">';
+	print '<input type="file" class="flat class=minwidth200" name="imagebackground" id="imagebackground">';
+	print '</td><td class="nocellnopadd" valign="middle" align="right">';
+	if (! empty($conf->global->MAIN_LOGIN_BACKGROUND)) {
+	    print '<a href="'.$_SERVER["PHP_SELF"].'?action=removebackgroundlogin">'.img_delete($langs->trans("Delete")).'</a>';
+	    if (file_exists($conf->mycompany->dir_output.'/logos/'.$conf->global->MAIN_LOGIN_BACKGROUND)) {
+	        print ' &nbsp; ';
+	        print '<img width="100px" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;file='.urlencode('/'.$conf->global->MAIN_LOGIN_BACKGROUND).'">';
+	    }
+	} else {
+	    print '<img width="100" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png">';
+	}
+	print '</td></tr></table>';
+	print '</td></tr>';
+	
+	print '</table>'."\n";
+	
 
     print '<br><div class="center">';
     print '<input class="button" type="submit" name="submit" value="'.$langs->trans("Save").'">';
@@ -346,7 +466,7 @@ else	// Show
 {
     // Language
     print '<table class="noborder" width="100%">';
-    print '<tr class="liste_titre"><td>'.$langs->trans("Parameters").'</td><td>'.$langs->trans("Value").'</td><td>&nbsp;</td></tr>';
+    print '<tr class="liste_titre"><td>'.$langs->trans("Language").'</td><td></td><td>&nbsp;</td></tr>';
 
     print '<tr class="oddeven"><td width="35%">'.$langs->trans("DefaultLanguage").'</td><td>';
     $s=picto_from_langcode($conf->global->MAIN_LANG_DEFAULT);
@@ -486,12 +606,6 @@ else	// Show
     print yn((isset($conf->global->MAIN_HELPCENTER_DISABLELINK)?$conf->global->MAIN_HELPCENTER_DISABLELINK:0),1);
     print '</td></tr>';
 
-	// Message login
-    print '<tr class="oddeven"><td width="35%">'.$langs->trans("MessageLogin").'</td><td colspan="2">';
-    if (isset($conf->global->MAIN_HOME)) print dol_htmlcleanlastbr($conf->global->MAIN_HOME);
-    else print '&nbsp;';
-    print '</td></tr>'."\n";
-
     // Message of the day
     print '<tr class="oddeven"><td width="35%">'.$langs->trans("MessageOfDay").'</td><td colspan="2">';
     if (isset($conf->global->MAIN_MOTD)) print dol_htmlcleanlastbr($conf->global->MAIN_MOTD);
@@ -500,6 +614,39 @@ else	// Show
 
     print '</table>'."\n";
 
+    print '<br>';
+    
+    // Login page
+    print '<table class="noborder" width="100%">';
+    print '<tr class="liste_titre"><td>'.$langs->trans("LoginPage").'</td><td></td><td>&nbsp;</td></tr>';
+
+    // Message login
+    print '<tr class="oddeven"><td width="35%">'.$langs->trans("MessageLogin").'</td><td colspan="2">';
+    if (isset($conf->global->MAIN_HOME)) print dol_htmlcleanlastbr($conf->global->MAIN_HOME);
+    else print '&nbsp;';
+    print '</td></tr>'."\n";
+    
+    // Background login
+    // Logo
+    $var=!$var;
+    print '<tr class="oddeven"><td>'.$langs->trans("BackgroundImageLogin").'</td><td colspan="2">';
+    print '<div class="tagtable centpercent"><div class="tagtr inline-block centpercent valignmiddle"><div class="tagtd inline-block valignmiddle left">';
+    print $conf->global->MAIN_LOGIN_BACKGROUND;
+    print '</div><div class="tagtd inline-block valignmiddle left">';
+    // It offers the generation of the thumbnail if it does not exist
+    if ($conf->global->MAIN_LOGIN_BACKGROUND && is_file($conf->mycompany->dir_output.'/logos/'.$conf->global->MAIN_LOGIN_BACKGROUND))
+    {
+        print '<img class="img_logo" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;file='.urlencode($conf->global->MAIN_LOGIN_BACKGROUND).'">';
+    }
+    else
+    {
+        print '<img class="img_logo" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png">';
+    }
+    print '</div></div></div>';
+    print '</td></tr>';
+    
+    print '</table>'."\n";
+    
     print '<div class="tabsAction">';
     print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit">'.$langs->trans("Modify").'</a>';
     print '</div>';
diff --git a/htdocs/cashdesk/index.php b/htdocs/cashdesk/index.php
index 9a61a50b38a1abd020e3d699e5bbc5615e4a9730..8f6af8b6d4d92a3bd83411ab55e234733eeaf281 100644
--- a/htdocs/cashdesk/index.php
+++ b/htdocs/cashdesk/index.php
@@ -63,7 +63,7 @@ top_htmlhead('','',0,0,'',$arrayofcss);
 <?php
 if (! empty($mysoc->logo_small))
 {
-    print '<img class="logopos" alt="Logo company" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode('/thumbs/'.$mysoc->logo_small).'">';
+    print '<img class="logopos" alt="Logo company" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;file='.urlencode('/thumbs/'.$mysoc->logo_small).'">';
 }
 else
 {
diff --git a/htdocs/cashdesk/tpl/ticket.tpl.php b/htdocs/cashdesk/tpl/ticket.tpl.php
index 78ce86f45f7ad31dd710ed56104c0d2ad35fa693..40be470c429916101756780430e7cb3b8a838b12 100644
--- a/htdocs/cashdesk/tpl/ticket.tpl.php
+++ b/htdocs/cashdesk/tpl/ticket.tpl.php
@@ -37,7 +37,7 @@ $object->fetch($facid);
 
 <div class="entete">
     <div class="logo">
-        <?php print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode('/thumbs/'.$mysoc->logo_small).'">'; ?>
+        <?php print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;file='.urlencode('/thumbs/'.$mysoc->logo_small).'">'; ?>
     </div>
     <div class="infos">
         <p class="address"><?php echo $mysoc->name; ?><br>
diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php
index 1cb4da034889785f45a4de67f7e51bca045c690a..0d4c1dff71e3dc9efb3d0084efefaee5e79aac25 100644
--- a/htdocs/core/lib/files.lib.php
+++ b/htdocs/core/lib/files.lib.php
@@ -1590,7 +1590,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
 	$relative_original_file = $original_file;
 	
 	// Wrapping for some images
-	if ($modulepart == 'companylogo' && !empty($conf->mycompany->dir_output))
+	if (($modulepart == 'mycompany' || $modulepart == 'companylogo') && !empty($conf->mycompany->dir_output))
 	{
 		$accessallowed=1;
 		$original_file=$conf->mycompany->dir_output.'/logos/'.$original_file;
diff --git a/htdocs/core/lib/security2.lib.php b/htdocs/core/lib/security2.lib.php
index fc05e2c91943fd7af72436ad14e23046824f695b..cadf133169dab954563e0fdfc5126c440755164f 100644
--- a/htdocs/core/lib/security2.lib.php
+++ b/htdocs/core/lib/security2.lib.php
@@ -227,11 +227,11 @@ function dol_loginfunction($langs,$conf,$mysoc)
 
 	if (! empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small))
 	{
-		$urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&amp;modulepart=companylogo&amp;file='.urlencode('thumbs/'.$mysoc->logo_small);
+		$urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&amp;modulepart=mycompany&amp;file='.urlencode('thumbs/'.$mysoc->logo_small);
 	}
 	elseif (! empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo))
 	{
-		$urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&amp;modulepart=companylogo&amp;file='.urlencode($mysoc->logo);
+		$urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&amp;modulepart=mycompany&amp;file='.urlencode($mysoc->logo);
 		$width=128;
 	}
 	elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/img/dolibarr_logo.png'))
diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php
index 2c2d2c5ec63bf00a6abeb38e91b4f8f4b33b4782..e95359e5683b79fa4d113ed2db31088d4326f99e 100644
--- a/htdocs/core/menus/standard/auguria.lib.php
+++ b/htdocs/core/menus/standard/auguria.lib.php
@@ -257,7 +257,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM
 		$mysoc->logo_mini=$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI;
 		if (! empty($mysoc->logo_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini))
 		{
-			$urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&amp;modulepart=companylogo&amp;file='.urlencode('thumbs/'.$mysoc->logo_mini);
+			$urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&amp;modulepart=mycompany&amp;file='.urlencode('thumbs/'.$mysoc->logo_mini);
 		}
 		else
 		{
diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php
index 178f1ca9db7bee1c90ea9aedbde5016f60d4e757..ccf6902a289489470a1eb249e5531f0f700fe64e 100644
--- a/htdocs/core/menus/standard/eldy.lib.php
+++ b/htdocs/core/menus/standard/eldy.lib.php
@@ -466,7 +466,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
 		$mysoc->logo_mini=$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI;
 		if (! empty($mysoc->logo_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini))
 		{
-			$urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&amp;modulepart=companylogo&amp;file='.urlencode('thumbs/'.$mysoc->logo_mini);
+			$urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&amp;modulepart=mycompany&amp;file='.urlencode('thumbs/'.$mysoc->logo_mini);
 		}
 		else
 		{
@@ -478,7 +478,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
 		print '<div class="menu_titre" id="menu_titre_logo"></div>';
 		print '<div class="menu_top" id="menu_top_logo"></div>';
 		print '<div class="menu_contenu" id="menu_contenu_logo">';
-		print '<div class="center"><img class="companylogo" title="'.dol_escape_htmltag($title).'" alt="" src="'.$urllogo.'" style="max-width: 80%"></div>'."\n";
+		print '<div class="center"><img class="mycompany" title="'.dol_escape_htmltag($title).'" alt="" src="'.$urllogo.'" style="max-width: 80%"></div>'."\n";
 		print '</div>';
 		print '<div class="menu_end" id="menu_end_logo"></div>';
 		print '</div>'."\n";
diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php
index e0aa28ce2d67126a088d38f52c0118e41f7c3588..a23d14a979d7301269f4e53271a08a710e3059f3 100644
--- a/htdocs/core/tpl/login.tpl.php
+++ b/htdocs/core/tpl/login.tpl.php
@@ -45,7 +45,7 @@ print top_htmlhead('', $titleofloginpage, 0, 0, $arrayofjs, array(), 0, $disable
 ?>
 <!-- BEGIN PHP TEMPLATE LOGIN.TPL.PHP -->
 
-<body class="body bodylogin">
+<body class="body bodylogin"<?php print empty($conf->global->MAIN_LOGIN_BACKGROUND)?'':' style="background-image: url(\''.DOL_URL_ROOT.'/viewimage.php?cache=1&noalt=1&modulepart=mycompany&file='.urlencode($conf->global->MAIN_LOGIN_BACKGROUND).'\')"'; ?>>
 
 <?php if (empty($conf->dol_use_jmobile)) { ?>
 <script type="text/javascript">
@@ -56,7 +56,7 @@ $(document).ready(function () {
 </script>
 <?php } ?>
 
-<div class="center">
+<div class="login_center center">
 <div class="login_vertical_align">
 
 <form id="login" name="login" method="post" action="<?php echo $php_self; ?>">
@@ -76,16 +76,6 @@ $(document).ready(function () {
 <input type="hidden" name="dol_no_mouse_hover" id="dol_no_mouse_hover" value="<?php echo $dol_no_mouse_hover; ?>" />
 <input type="hidden" name="dol_use_jmobile" id="dol_use_jmobile" value="<?php echo $dol_use_jmobile; ?>" />
 
-<table class="login_table_title center" title="<?php echo dol_escape_htmltag($title); ?>">
-<tr class="vmenu"><td class="center">
-<?php
-if ($disablenofollow) echo '<a class="login_table_title" href="https://www.dolibarr.org" target="_blank">';
-echo dol_escape_htmltag($title); 
-if ($disablenofollow) echo '</a>';
-?>
-</td></tr>
-</table>
-<br>
 
 <div class="login_table">
 
@@ -159,9 +149,6 @@ if (! empty($hookmanager->resArray['options'])) {
 </div> <!-- end div left -->
 
 
-
-
-
 </div>
 
 <div id="login_line2" style="clear: both">
@@ -226,6 +213,17 @@ if (isset($conf->file->main_authentication) && preg_match('/openid/',$conf->file
 
 </div>
 
+
+<!-- Title with version -->
+<div class="login_table_title center" title="<?php echo dol_escape_htmltag($title); ?>">
+<?php
+if ($disablenofollow) echo '<a class="login_table_title" href="https://www.dolibarr.org" target="_blank">';
+echo dol_escape_htmltag($title); 
+if ($disablenofollow) echo '</a>';
+?>
+</div>
+
+
 </form>
 
 
diff --git a/htdocs/core/tpl/passwordforgotten.tpl.php b/htdocs/core/tpl/passwordforgotten.tpl.php
index b641627b7894b998a9bf5786171aff3375e1a6d6..8a403d675d75c5132bc657b86a45a152c9189f80 100644
--- a/htdocs/core/tpl/passwordforgotten.tpl.php
+++ b/htdocs/core/tpl/passwordforgotten.tpl.php
@@ -32,7 +32,7 @@ print top_htmlhead('',$langs->trans('SendNewPassword'));
 ?>
 <!-- BEGIN PHP TEMPLATE PASSWORDFORGOTTEN.TPL.PHP -->
 
-<body class="bodylogin">
+<body class="body bodylogin"<?php print empty($conf->global->MAIN_LOGIN_BACKGROUND)?'':' style="background-image: url(\''.DOL_URL_ROOT.'/viewimage.php?cache=1&noalt=1&modulepart=mycompany&file='.urlencode($conf->global->MAIN_LOGIN_BACKGROUND).'\')"'; ?>>
 
 <?php if (empty($conf->dol_use_jmobile)) { ?>
 <script type="text/javascript">
@@ -44,24 +44,19 @@ $(document).ready(function () {
 <?php } ?>
 
 
-<div align="center">
+<div class="login_center center">
 <div class="login_vertical_align">
 
-
 <form id="login" name="login" method="POST" action="<?php echo $php_self; ?>">
 <input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>">
 <input type="hidden" name="action" value="buildnewpassword">
 
-<table class="login_table_title center" summary="<?php echo dol_escape_htmltag($title); ?>">
-<tr class="vmenu"><td align="center"><?php echo $title; ?></td></tr>
-</table>
-<br>
+
 
 <div class="login_table">
 
 <div id="login_line1">
 
-
 <div id="login_left">
 
 <img alt="Logo" title="" src="<?php echo $urllogo; ?>" id="img_logo" />
@@ -111,7 +106,7 @@ if (! empty($hookmanager->resArray['options'])) {
 	</span>
 	</td>
 	<td><img src="<?php echo DOL_URL_ROOT ?>/core/antispamimage.php" border="0" width="80" height="32" id="img_securitycode" /></td>
-	<td><a href="<?php echo $php_self; ?>" tabindex="4" data-role="button"><?php echo $captcha_refresh; ?></a></td>
+	<td><a href="<?php echo $php_self; ?>" tabindex="4"><?php echo $captcha_refresh; ?></a></td>
 	</tr></table>
 
 	</td></tr>
@@ -128,8 +123,8 @@ if (! empty($hookmanager->resArray['options'])) {
 
 <div id="login_line2" style="clear: both">
 
-<!-- Button Send password -->
-<br><input id="password" type="submit" <?php echo $disabled; ?> class="button" name="password" value="<?php echo $langs->trans('SendNewPassword'); ?>" tabindex="4" />
+<!-- Button "Regenerate and Send password" -->
+<br><input type="submit" <?php echo $disabled; ?> class="button" name="password" value="<?php echo $langs->trans('SendNewPassword'); ?>" tabindex="4" />
 
 <br>
 <div align="center" style="margin-top: 8px;">
@@ -148,6 +143,15 @@ if (! empty($hookmanager->resArray['options'])) {
 
 </div>
 
+<!-- Title with version -->
+<div class="login_table_title center" title="<?php echo dol_escape_htmltag($title); ?>">
+<?php
+if ($disablenofollow) echo '<a class="login_table_title" href="https://www.dolibarr.org" target="_blank">';
+echo dol_escape_htmltag($title); 
+if ($disablenofollow) echo '</a>';
+?>
+</div>
+
 </form>
 
 
diff --git a/htdocs/install/doctemplates/mycompany/background_computer_coffee.jpg b/htdocs/install/doctemplates/mycompany/background_computer_coffee.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..0a4c8828a585c72cb1df00e127aea7d026c842a3
Binary files /dev/null and b/htdocs/install/doctemplates/mycompany/background_computer_coffee.jpg differ
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 1d16fefa9595764c7d2705110b4abc0c09f47eec..54abd345136bfe25137d2467ebd4c6fbebc38558 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -936,6 +936,8 @@ DefaultMaxSizeList=Default max length for lists
 DefaultMaxSizeShortList=Default max length for short lists (ie in customer card)
 MessageOfDay=Message of the day
 MessageLogin=Login page message
+LoginPage=Login page
+BackgroundImageLogin=Background image
 PermanentLeftSearchForm=Permanent search form on left menu
 DefaultLanguage=Default language to use (language code)
 EnableMultilangInterface=Enable multilingual interface
diff --git a/htdocs/margin/tabs/productMargins.php b/htdocs/margin/tabs/productMargins.php
index 7550b672007463543a77956f74ebc84b62fc2023..bac8bebe52a46171528cbfcc276e94374b27396a 100644
--- a/htdocs/margin/tabs/productMargins.php
+++ b/htdocs/margin/tabs/productMargins.php
@@ -93,7 +93,7 @@ if ($id > 0 || ! empty($ref))
 		$head=product_prepare_head($object);
 		$titre=$langs->trans("CardProduct".$object->type);
 		$picto=($object->type== Product::TYPE_SERVICE?'service':'product');
-		dol_fiche_head($head, 'margin', $titre, 0, $picto);
+		dol_fiche_head($head, 'margin', $titre, -1, $picto);
 
 		$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>';
 		
diff --git a/htdocs/opensurvey/fonctions.php b/htdocs/opensurvey/fonctions.php
index d194646140cea4c1fa3367c6011d30e0609792f5..3828d4e5e25c4bef426936e02a56aa99ed4f9a9d 100644
--- a/htdocs/opensurvey/fonctions.php
+++ b/htdocs/opensurvey/fonctions.php
@@ -108,7 +108,7 @@ function showlogo()
 	// Print logo
 	if ($mysoc->logo) {
 		if (file_exists($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) {
-			$urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&amp;modulepart=companylogo&amp;file=thumbs/'.urlencode($mysoc->logo_small);
+			$urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&amp;modulepart=mycompany&amp;file=thumbs/'.urlencode($mysoc->logo_small);
 		}
 	}
 
diff --git a/htdocs/product/document.php b/htdocs/product/document.php
index cedfec4abdc530161c40e9485935691a1439f8f8..c7199c998680f2caa65e08fa791e0d973e7430d8 100644
--- a/htdocs/product/document.php
+++ b/htdocs/product/document.php
@@ -188,7 +188,8 @@ if ($object->id)
 	$head=product_prepare_head($object);
 	$titre=$langs->trans("CardProduct".$object->type);
 	$picto=($object->type== Product::TYPE_SERVICE?'service':'product');
-	dol_fiche_head($head, 'documents', $titre, 0, $picto);
+	
+	dol_fiche_head($head, 'documents', $titre, -1, $picto);
 
 	$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action);    // Note that $action and $object may have been modified by hook
 	if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php
index ab959f479fd96e08675004e7b9aae1c8d6895497..afabf20989726b52c0dfa24a36c44b92930126ec 100644
--- a/htdocs/product/fournisseurs.php
+++ b/htdocs/product/fournisseurs.php
@@ -305,10 +305,11 @@ if ($id > 0 || $ref)
 			$head=product_prepare_head($object);
 			$titre=$langs->trans("CardProduct".$object->type);
 			$picto=($object->type== Product::TYPE_SERVICE?'service':'product');
-			dol_fiche_head($head, 'suppliers', $titre, 0, $picto);
+			
+			dol_fiche_head($head, 'suppliers', $titre, -1, $picto);
 			
 			$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>';
-		$object->next_prev_filter=" fk_product_type = ".$object->type;		
+		    $object->next_prev_filter=" fk_product_type = ".$object->type;		
             dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref');
             
             print '<div class="fichecenter">';
diff --git a/htdocs/product/info.php b/htdocs/product/info.php
index af626cce5dd5fbab1599d907cb5e942075d2dabc..e6011c7945cf6ab154be1ddcd78620a677a61bba 100644
--- a/htdocs/product/info.php
+++ b/htdocs/product/info.php
@@ -91,7 +91,8 @@ if ($id > 0 || $ref)
 	$head=product_prepare_head($object);
     $titre=$langs->trans("CardProduct".$object->type);
     $picto=($object->type== Product::TYPE_SERVICE?'service':'product');
-    dol_fiche_head($head, 'info', $titre, 0, $picto);
+    
+    dol_fiche_head($head, 'info', $titre, -1, $picto);
 
 	$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>';
 	$object->next_prev_filter=" fk_product_type = ".$object->type;
diff --git a/htdocs/product/note.php b/htdocs/product/note.php
index c63d60229fb8c80bfe1be722715d50ff3bc22ea9..0178635ed102cb5b5ba1d586cf5bdbf24400ff55 100644
--- a/htdocs/product/note.php
+++ b/htdocs/product/note.php
@@ -91,7 +91,7 @@ if ($id > 0 || ! empty($ref))
     $titre=$langs->trans("CardProduct".$object->type);
     $picto=($object->type==Product::TYPE_SERVICE?'service':'product');
     
-    dol_fiche_head($head, 'note', $titre, 0, $picto);
+    dol_fiche_head($head, 'note', $titre, -1, $picto);
 
 	$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>';
     $object->next_prev_filter=" fk_product_type = ".$object->type;
diff --git a/htdocs/product/price.php b/htdocs/product/price.php
index 8601ce9c05d9c72b46a9405c1049355284978c56..90adaa96856119e616a589ff1abfbc2bba30ee1e 100644
--- a/htdocs/product/price.php
+++ b/htdocs/product/price.php
@@ -654,7 +654,8 @@ llxHeader('', $title, $helpurl);
 $head = product_prepare_head($object);
 $titre = $langs->trans("CardProduct" . $object->type);
 $picto = ($object->type == Product::TYPE_SERVICE ? 'service' : 'product');
-dol_fiche_head($head, 'price', $titre, 0, $picto);
+
+dol_fiche_head($head, 'price', $titre, -1, $picto);
 
 $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>';
 $object->next_prev_filter=" fk_product_type = ".$object->type;
diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php
index f12316591d0b7150a8d102ae29ae95ed6ebcca6a..6c5040c15893178fd7a51a93765fa06995e5783e 100644
--- a/htdocs/product/stock/product.php
+++ b/htdocs/product/stock/product.php
@@ -538,7 +538,8 @@ if ($id > 0 || $ref)
 		$head=product_prepare_head($object);
 		$titre=$langs->trans("CardProduct".$object->type);
 		$picto=($object->type==Product::TYPE_SERVICE?'service':'product');
-		dol_fiche_head($head, 'stock', $titre, 0, $picto);
+		
+		dol_fiche_head($head, 'stock', $titre, -1, $picto);
 
 		dol_htmloutput_events();
 
diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php
index b101e656f67f3c1a2c4b7ec9df88d5453fa4f3bf..e01201ccea309015e317b3a330a620086ac17d79 100644
--- a/htdocs/public/members/new.php
+++ b/htdocs/public/members/new.php
@@ -99,11 +99,11 @@ function llxHeaderVierge($title, $head="", $disablejs=0, $disablehead=0, $arrayo
 
     if (! empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small))
     {
-        $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&amp;modulepart=companylogo&amp;file='.urlencode('thumbs/'.$mysoc->logo_small);
+        $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&amp;modulepart=mycompany&amp;file='.urlencode('thumbs/'.$mysoc->logo_small);
     }
     elseif (! empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo))
     {
-        $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&amp;modulepart=companylogo&amp;file='.urlencode($mysoc->logo);
+        $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&amp;modulepart=mycompany&amp;file='.urlencode($mysoc->logo);
         $width=128;
     }
     elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.png'))
diff --git a/htdocs/public/paybox/newpayment.php b/htdocs/public/paybox/newpayment.php
index 1945aa6c8cf61424e96874215f6d61cad4e10475..5f83855529def65b93040ecc565c6e10b37661cb 100644
--- a/htdocs/public/paybox/newpayment.php
+++ b/htdocs/public/paybox/newpayment.php
@@ -195,11 +195,11 @@ else if (! empty($conf->global->PAYBOX_LOGO)) $logosmall=$conf->global->PAYBOX_L
 $urllogo='';
 if (! empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$logosmall))
 {
-	$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode('thumbs/'.$logosmall);
+	$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;file='.urlencode('thumbs/'.$logosmall);
 }
 elseif (! empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$logo))
 {
-	$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode($logo);
+	$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;file='.urlencode($logo);
 	$width=96;
 }
 // Output html code for logo
diff --git a/htdocs/public/paypal/newpayment.php b/htdocs/public/paypal/newpayment.php
index b5d105d6cf6bfc6ca54448be304aa320c7eca754..8313c39bb95633c4e76fa576b5b0832758fed06e 100644
--- a/htdocs/public/paypal/newpayment.php
+++ b/htdocs/public/paypal/newpayment.php
@@ -300,11 +300,11 @@ else if (! empty($conf->global->PAYBOX_LOGO)) $logosmall=$conf->global->PAYBOX_L
 $urllogo='';
 if (! empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$logosmall))
 {
-	$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode('thumbs/'.$logosmall);
+	$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;file='.urlencode('thumbs/'.$logosmall);
 }
 elseif (! empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$logo))
 {
-	$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode($logo);
+	$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;file='.urlencode($logo);
 	$width=96;
 }
 // Output html code for logo
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php
index b43eb6450c1cf0c4880e22225c8b09f772da4611..3ea4047070827c81a1bbd32b321fe36cd444d8fc 100644
--- a/htdocs/theme/eldy/style.css.php
+++ b/htdocs/theme/eldy/style.css.php
@@ -1490,21 +1490,28 @@ foreach($mainmenuusedarray as $val)
 .bodylogin
 {
 	background: #f0f0f0;
-	/* background: linear-gradient(to left top, rgb(255,255,255), rgb(240,240,240)) fixed; */
+	display: table;
+    position: absolute;
+    height: 100%;
+    width: 100%;	
+}
+.login_center {
+	display: table-cell;
+    vertical-align: middle;
 }
 .login_vertical_align {
 	padding: 10px;
 }
 form#login {
-	margin-top: <?php echo $dol_optimize_smallscreen?'30':'60' ?>px;
-	margin-bottom: 30px;
+	padding-bottom: 30px;
 	font-size: 13px;
 	vertical-align: middle;
 }
 .login_table_title {
 	max-width: 530px;
-	color: #888888 !important;
-	text-shadow: 1px 1px 1px #FFF;
+	color: #aaa !important;
+	padding-top: 30px;
+	/* text-shadow: 1px 1px 1px #FFF; */
 }
 .login_table label {
 	text-shadow: 1px 1px 1px #FFF;
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index 2a393dee7481f763185b1750232468924629b6d2..28c3c6c01932977dd5cb2c5f2907436e7557f1f7 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -1523,20 +1523,28 @@ foreach($mainmenuusedarray as $val)
 .bodylogin
 {
 	background: #f0f0f0;
+	display: table;
+    position: absolute;
+    height: 100%;
+    width: 100%;	
 }
+.login_center {
+	display: table-cell;
+    vertical-align: middle;
+}	
 .login_vertical_align {
 	padding: 10px;
 }
 form#login {
-	margin-top: <?php echo $dol_optimize_smallscreen?'30':'60' ?>px;
-	margin-bottom: 30px;
+	padding-bottom: 30px;
 	font-size: 13px;
 	vertical-align: middle;
 }
 .login_table_title {
 	max-width: 530px;
-	color: #888888 !important;
-	text-shadow: 1px 1px 1px #FFF;
+	color: #aaa !important;
+	padding-top: 30px;
+	/* text-shadow: 1px 1px 1px #FFF; */
 }
 .login_table label {
 	text-shadow: 1px 1px 1px #FFF;
diff --git a/htdocs/user/passwordforgotten.php b/htdocs/user/passwordforgotten.php
index cb38d1c9e495daf7852c87c948b8ff17876093f2..f7acc3609c7c610d94b851a3fcea092e7a526f95 100644
--- a/htdocs/user/passwordforgotten.php
+++ b/htdocs/user/passwordforgotten.php
@@ -214,11 +214,11 @@ $rowspan=2;
 $urllogo=DOL_URL_ROOT.'/theme/login_logo.png';
 if (! empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small))
 {
-	$urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&amp;modulepart=companylogo&amp;file='.urlencode('thumbs/'.$mysoc->logo_small);
+	$urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&amp;modulepart=mycompany&amp;file='.urlencode('thumbs/'.$mysoc->logo_small);
 }
 elseif (! empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo))
 {
-	$urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&amp;modulepart=companylogo&amp;file='.urlencode($mysoc->logo);
+	$urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&amp;modulepart=mycompany&amp;file='.urlencode($mysoc->logo);
 	$width=128;
 }
 elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/img/dolibarr_logo.png'))
diff --git a/htdocs/viewimage.php b/htdocs/viewimage.php
index 6fa65660df1619a7adf4610ede70d8e8f6b63532..f69c7e4e4aaf3efc23d8594cb783611c7dbf1cac 100644
--- a/htdocs/viewimage.php
+++ b/htdocs/viewimage.php
@@ -35,7 +35,7 @@ if (! defined('NOREQUIREHTML'))		define('NOREQUIREHTML','1');
 if (! defined('NOREQUIREAJAX'))		define('NOREQUIREAJAX','1');
 if (! defined('NOREQUIREHOOK'))		define('NOREQUIREHOOK','1');	// Disable "main.inc.php" hooks
 // Some value of modulepart can be used to get resources that are public so no login are required.
-if ((isset($_GET["modulepart"]) && $_GET["modulepart"] == 'companylogo') && ! defined("NOLOGIN")) define("NOLOGIN",'1');
+if ((isset($_GET["modulepart"]) && ($_GET["modulepart"] == 'mycompany' || $_GET["modulepart"] == 'companylogo')) && ! defined("NOLOGIN")) define("NOLOGIN",'1');
 if ((isset($_GET["modulepart"]) && $_GET["modulepart"] == 'medias') && ! defined("NOLOGIN"))
 {
 	define("NOLOGIN",'1');
@@ -179,7 +179,7 @@ else					// Open and return file
     dol_syslog("viewimage.php return file $original_file content-type=$type");
 
     // This test is to avoid error images when image is not available (for example thumbs).
-    if (! dol_is_file($original_file))
+    if (! dol_is_file($original_file) && empty($_GET["noalt"]))
     {
         $original_file=DOL_DOCUMENT_ROOT.'/public/theme/common/nophoto.png';
         /*$error='Error: File '.$_GET["file"].' does not exists or filesystems permissions are not allowed';