testing and fixing registerOrLogin