Refactor database queries for use with Mongoid, ActiveRecord

The `exists?` method has distinct meaning in Mongoid and AR.
See http://mongoid.org/en/mongoid/docs/querying.html#queries

The `find_by_email`, `find_by` too.