refactor controller and make helpers
bcrypt functional