logout and login buttons functions updated.