authentication almost done
finished authentication
set up API for post index page