Updated logged in functionality