Adding some security checks on the servlets