Fix logout button

Only works after refresh