<% if User.count == 0 %>
  <h2>First Startup</h2>
  Please create your admin account.
<% else %>
<h2>New user</h2>
<% end %>
<%= form_for @new_user do |f| %>
<% if @new_user.errors.any? %>
  <div class="error_messages">
    <h2>Form is invalid</h2>
    <ul>
      <% for message in @new_user.errors.full_messages %>
        <li><%= message %></li>
      <% end %>
    </ul>
  </div>
<% end %>
<p>
  <%= f.label :username %><br />
  <%= f.text_field :username %>
</p>
<p>
  <%= f.label :password %><br />
  <%= f.password_field :password %>
</p>
<p>
  <%= f.label :password_confirmation %><br />
  <%= f.password_field :password_confirmation %>
</p>
<% if (current_user && current_user.admin == true) %>
<p>
  <%= f.label :admin %><br/>
  <%= f.check_box :admin %>
</p>
<% end %>
<p class="button"><%= f.submit %></p>
<% end %>