Adapt devise in order to work properly in both applications