if you downloaded your AS instance from Oracle web site(separately from NetBeans)
https://glassfish.java.net/download.html
and start domain from console with
asadmin start-domain domain1
you would not have any troubles with authentication. However it looks like NetBeans puzzles you. You may find a solution here. See Quaternion's answer.