refactored user.js

took out notifications, email and reset code to separate files