made it so tries to publish first before logging in again