@Override
	public boolean connectUser() {
		boolean result;
		
		UserDTO userDTO = getUserConnected();
		if (userDTO == null ){
			result = false;
		}else{
			User user = null;
			
			try {
				if(usersManager.existUser(userDTO.getName())){
					user = usersManager.getUser(userDTO.getName());
				}else{
					result = false;
					removeAttributeSession();
				}
			} catch (Exception e) {
//				logger.error("Error in logout: " + e.getMessage());
				throw new IllegalStateException("Error in logout.");
			}
			
			// si el usuario esta conectado abortamos el metodo
			if(user.isConnect()){
				result = false;
				removeAttributeSession();
			}else{
				connectOrDisconnect(user, true);
				result = true;
			}
		}
		
		return result;
	}