Show / Hide login menu item not connected to node I have a login menu item that links to the login page of my website. I want to have the menu item disappearing when someone is logged in and an a sign out button appearing in its place.

Since the menu item is not connected to a node, i cannot alter it's visibility based on node access rights. I found Menu Item Visibility module but it is beta and it does not seem to be maintained. Is there a way to do this via Drupal?

If I have to make a custom module or js can you give me a link of a tutorial on how to do this?
For login add a menu item into main menu named as Login and path should be user/login.

For logout add a menu item into main menu named as logout and path should be user/logout

Now when user will be login then login menu will replaced by logout automatically. And when he/she will be logout then a login menu will appear again.