added better authentication