Added checking if the user is logged in on homepagw load