Add authentication via tokens and cookies