Yes, you can!
The easiest way to do that is through the Login or Logout Menu Item plugin from cartpauj.
Once the plugin is installed and activated, go to Appearance > Menus and add the login, logout, or login/logout link to your menu.
This will automatically display a login or log out link depending on the current user's logged-in status on your site.