Added general code to validate user

Still needs to be modified to query the UserDB to check user level. I
guess we should set a global variable for the user level? Not sure.