Refactor accounts controller

I noticed that CodeClimate reports the AccountsController as being of the more complex files in the app. These refactoring should slightly improve it.