Redirect to the proper page after login.

Fixed a few bugs and made a temporary fix for missing onboarding
documents.