Fixed logged in user fetching code