public boolean logOutActions() {
		boolean canLogout = true;
		
		if (user.username == null)
			return true;
		
		if (user.getUserType().equals(UserTypes.seller)) {
			canLogout = user.canSellerLogout();
		} else {
			doBuyerLogoutActions();
		}

		if (canLogout) {
			if (user.getUserType().equals(UserTypes.seller))
				med.logOutSeller(user.getUsername(), user.getAllUsers());
			else
				med.logOut(user.getUsername());
			
			loggerGui.info("[log out] " + user.getUsername());
			
			// show the Log In page again
			cardLayout.show(panelCards, Page.Page1.getName());
			
			resetUserData();
			Page.Page2.panel.removeAll();
		} else {
			loggerGui.info("[log out]" + user.getUsername() + " didn't meet the conditions");
			JOptionPane.showMessageDialog(Page.Page2.panel,
					ErrorMessages.logOutDenied);
		}
		
		return canLogout;
	}