Authentication, both for Rails API and Ember