fixed cookie expiration
logout function fixed