non logged in users do not generate run time errors on the main page
quering data base is only done when a user is logged in