added some authentication functionality