fix error reporting and redirection to home after registration