First, move "if controller.controller_name == 'users' && controller.action_name == 'login'" into a helper and give it a name, such as login_page_class. It should return nil on the wrong page and 'current' on the right page.
Next, use content_tag to build the entire li. Then if :class => login_page_class contains the nil, the class="" itself will go away in the rendered HTML.
(And put all this under test, because it's logic that you want to keep alive as you upgrade this site!)