function changes login in order to determine whether it was correct or incorrect loguin