It has always worked like that.
Checking whether a user is logged in, and verifying their password, requires access to information stored in the database. The Moodle 2.0 code can only make sense of the data in the database after it has been upgraded to the Moodle 2.0 structure. That is why the upgrade has to run before you are asked to log in.
So, you need to put your site into maintenance mode before you upload the new version of the code.