Work in progress. Working auth
Working version