I should use only one of the check? this one:  if (session == null) or  this: if (password != null && userId != null). Or it should be two check in the same if block?