Added some code making sure user is logged in before displaying certain options