added jay's changes to logout and user