refactor: devise authenticate and add specs