Added login / logout if,then statement