Solution:
Latest browser versions do not allow any script to close a window that was not initially opened by the same script. This is a security precaution and you cannot do anything about that.
You can check Window.close()
documentation page to read more about it.
I suggest you follow the best practice, which is redirecting the user to home page after they log out.
(and of course you cannot close the browser from your controller)