What's wrong with my script? No Admin access

I just set up a fresh server via EC2 instance and I used this script in the user data:

#!/bin/bash
yum install java-1.8.0-openjdk.x86_64 wget -y   
mkdir -p /opt/nexus/   
mkdir -p /tmp/nexus/                           
cd /tmp/nexus/
NEXUSURL="https://download.sonatype.com/nexus/3/latest-unix.tar.gz"
wget $NEXUSURL -O nexus.tar.gz
EXTOUT=`tar xzvf nexus.tar.gz`
NEXUSDIR=`echo $EXTOUT | cut -d '/' -f1`
rm -rf /tmp/nexus/nexus.tar.gz
rsync -avzh /tmp/nexus/ /opt/nexus/
useradd nexus
chown -R nexus.nexus /opt/nexus 
cat <<EOT>> /etc/systemd/system/nexus.service
[Unit]                                                                          
Description=nexus service                                                       
After=network.target                                                            
                                                                  
[Service]                                                                       
Type=forking                                                                    
LimitNOFILE=65536                                                               
ExecStart=/opt/nexus/$NEXUSDIR/bin/nexus start                                  
ExecStop=/opt/nexus/$NEXUSDIR/bin/nexus stop                                    
User=nexus                                                                      
Restart=on-abort                                                                
                                                                  
[Install]                                                                       
WantedBy=multi-user.target                                                      

EOT

echo 'run_as_user="nexus"' > /opt/nexus/$NEXUSDIR/bin/nexus.rc
systemctl daemon-reload
systemctl start nexus
systemctl enable nexus

It lets me log in with username and the password from the opt path but no setup wizard pops up. I can’t change the password to one of my choice. I can’t enable or disable anonymous user. In addition to that, the administration menu with the ‘settings’ icon that’s usually to the left of the search bar isn’t there. This all leads me to think I don’t have admin access on the user I created for whatever reason. Is there something in my code I may have missed? Or how can I fix this? Any sort of help would be appreciated.

Note: I created this on a CentOS 7 EC2 instance (t2 medium).

I’d suggest checking your browser console for exceptions - maybe a browser extension or anti-virus is interfering with requests.

I don’t have an answer for not having admin access; I would check the Nexus log to see if there are any hints.

However, you might want to fix this:

cat <<EOT>> /etc/systemd/system/nexus.service

This keeps appending the same config to the nexus.service file, and I think that will break the service file.
Example:

$ rm -f t1.txt

$ cat <<EOT>>t1.txt
line1a
line2a
EOT

$ cat <<EOT>>t1.txt
line1b
line2b
EOT

$ cat t1.txt 
line1a
line2a
line1b
line2b

It should be:

cat <<EOT > /etc/systemd/system/nexus.service
...
EOT