working authentication
working version