Registration properly storing credentials in database.