Added home page redirection

- Added functionality to redirect the user to their profile if they are
signed in, otherwise the home page loads the sign in form.

- Added some tests from the guide in chapter 9, but most do not pass,
thought the functionality seems to be working!