merged the new changes and added some auth