replace login with refresh