Added username to authentication and security check