User Registration function fixed

Users can register and login!