Fixed layout to use proper name when determining user role, added distance calculation function to be used in deciding vendor distance