Remove trailing space, redirect profile page to app_host if on content_host

Fixes #38 and #40 :shipit: