Updated authentication function for the store user