Added a register and logout button and the logic for being logged in