authentication function added