Refactor devise helper