implemented a basic auth system