Refactor the serverless function to be a microservice and use NoSQL, making it work as an authservice. Tests including BDD.