When I choose shutdown option from the right top menu, Ubuntu is closing the session but coming back to the login screen. This is not a normal behaviour as Ubuntu should shutdown. But when I press the hardware shutdown button, I select shut-down on the screen and the laptop shuts down. that is fine.
Ubuntu 14.10
If any other remote user is logged in into your PC, or any software that runs using an another session, then Ubuntu will behave as you are telling its not an issue it actually prevents you to disconnect the remote user, but if you do shut down from power button then it will do force shut-down and disconnect the session from any other users.
before shutting down check whether any other session is still running.
by the following commands
or
and kill those session and try a normal shut-down.