Fixed more universal method to check if a user was logged in on html