fix layout error and add Pry

In some cases (usually after logout) the login view as giving an error like:

```ActionView::Template::Error (undefined method `each' for nil:NilClass)```

This was because it was trying to render the `application` layout instead of the `login` layout.

The Rails docs indicate that the thing we were doing before is supposed to work, but failed sometimes for some reason. This uses a different method that seems to work consistently.

Also adds [Pry](http://pryrepl.org/) to the `development` group in the Gemfile, becuase it's how bugs get fixed.