I think Marcos is right. In real life you wont have this problem. Probably and somehow your browsers sends the same cookie.
If you still want to completely eilimante this problem you can do some tricks like put in a hidden field, or when you call setAttribute("UserID", XxXX), first call getAttribute("UserID") to see if it already exists.
When i took a look in your code i noticed that you set up a new connection for EVERY reqest. To improve performance you should use connection pooling. Connections should be thread safe.
I like your last statment of "code"
//////////////THANK GOD THIS PAIN IN THE ASS IS DONE!!!