fixed redirection bug on registration