redirect to index in register if u're login