added code for username and attachment enumeration protection

added code for username and attachment enumeration protection