Refactored route into accounts controller