Made changes to more secure server-side checking for admin actions