moved code around into other files
fixed bug, added dummy auth