Move database connection from constructor to before_filter.