add class to fields on login block
This is what will work

    $form['#prefix'] = '&lt;div class="nano-ui"&gt;';
    $form['#suffix'] = '&lt;/div&gt;';

   $form['name']['#title'] = Null; // Change text on form
    $form['name']['#attributes'] = array('placeholder' =&gt; t('username'));
    $form['pass']['#title'] = Null;
    $form['pass']['#attributes'] = array('placeholder' =&gt; t('password'));

    $form['name']['#attributes']['class'][] = 'nui-input';


Here is the reference : How do I use hook_form_alter() to add CSS classes to a custom input field in user_register_form?