Added logout in the controller