Avoid a javascript error in the console when users are not logged in