Fixed a lot of the issues

The code to check whether user is logged in or not doesnt appear to always work, so sometimes you see "log in" and "register" in the navbar when you are logged in.