adding logout functionality to portal