More logic to deal with login/Register handling

Added a whole bunch more stuff to deal with different scenarios for
register/login coming from the intitial login page or from the nav script.
(Also add query variable to nav script to alert login page that user wants
registration)

Added more communication messages to deal with all of the new scenarios
due to added complexity of having to deal with different user types
and statuses on those user types.

Updated header to deal with the possibility of session not being present.
(was throwing error due to expecting it for logout link)