Fixes bug when mail is changed externally

When mail is changed externally (In DDELibra) the change isn't reflected in Drupal. This happens because during login Drupal calles the  the same code that handles updating email address from Drupal to provider . Which means that Drupal is trying to update back the new email address it has just received. This causes an exception because credentials are not saved at that time. This is suggestion for a fix where we distinguish between a update during login and normal update. There may other possible fixes.