Added secret token and other stuff so it works with sams db