working on conditional loggin routes