Working on authentication and corresponding tests