fixing redirect in register