Fixed redirect problem after register