Core pr 5

Fixed some user redirects and coding style.
I would think that this logic belongs in `hook_init` - not `hook_preprocess_html`.