min fix. Still not working correct redirect when logged