Fix use of atoi that was overflowing.

Made use of stringstream instead, also included
prelim updates for admin access and such.