update logout functionality