working version of login signin and logout