<!DOCTYPE html>
<html>
<head>
  <title>PredictiveMarket</title>
  <%= stylesheet_link_tag    "application", media: "all", "data-turbolinks-track" => true %>
  <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
  <%= csrf_meta_tags %>
</head>
<body>
<div id="user_login_box" style="float:right">
  <% if user_signed_in? -%>
    <%= current_user.email %> |
    <%= link_to 'My info', edit_user_registration_path %> |
    <%= link_to 'Sign out', destroy_user_session_path, method: :delete %>
  <% else %>
    <%= link_to "Sign up", new_user_registration_path %> or
    <%= link_to "Sign in", new_user_session_path %>
  <% end %>
</div>
<div style="float:left">
  <%= link_to 'Home', root_path %> |
  Balance: <%= current_user.balance %>
</div>
<div style="clear:both"></div>

<%= yield %>

</body>
</html>

<!DOCTYPE html>
<html>
<head>
  <title>PredictiveMarket</title>
  <%= stylesheet_link_tag    "application", media: "all", "data-turbolinks-track" => true %>
  <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
  <%= csrf_meta_tags %>
</head>
<body>
<div id="user_login_box" style="float:right">
  <% if user_signed_in? -%>
    <%= current_user.email %> |
    <%= link_to 'My info', edit_user_registration_path %> |
    <%= link_to 'Sign out', destroy_user_session_path, method: :delete %>
  <% else %>
    <%= link_to "Sign up", new_user_registration_path %> or
    <%= link_to "Sign in", new_user_session_path %>
  <% end %>
</div>
<div style="float:left">
  <%= link_to 'Home', root_path %> |
  Balance: <%= current_user.try(:balance) %>
</div>
<div style="clear:both"></div>

<%= yield %>

</body>
</html>

Fix bug when not logged in
Fix bug when not logged in
