Functionality now works with bcrypt, refactored some areas, tests all passed