devise works, not with api though