working user login/logout