Wrote a clien side of authentication