Adding authentication
Fixing the max problem
Adding cookies