Changed SecurityException to AuthenticationException to not conflict
with java.lang