Added fully tested authentication