Refactored passwords controller