Simultaneously try to execute commands after connecting to remote account to one account

I have made password less connection to my remote account. and i tried to execute commands at a time. but i am unable to execute the commands.

ssh $ACCOUNT_DETAILS@$HOST_DETAILS

cd  ~/JEE/*/logs/

The script runs command after command. The cd runs after the ssh has finished.
You can put simple remote commands as arguments to the ssh

ssh $ACCOUNT_DETAILS@$HOST_DETAILS "
cd  ~/JEE/*/logs/
ls
"

Or pass a local script. See my proposal in this thread.