added more authentication support and some additional routes.