Redirect back to the original page, not the home page, when setting beta mode.
Remove unused parse_url() call. That was dumb. Sorry.