Add permissions file and ip based authentication