fixed problems in register controller, and worked at preventing sql-injection in database access