login/logout features added (corrected)