After the Samsung Galaxy S2 locksreen bypass a while ago, and other Galaxy devices, the Sony Xperia Z lockscreen is also found to be bypassable. To bypass the lockscreen, you have to enter *#*#7378423#*#* in the emergency dialer, which brings you to the service menu. After that choose Service tests > NFC > NFC Diag Test, let it run and then press the home button. Congratulations, you now have full access to the phone.
This process is very easy and can be done in 30 seconds, as shown in the video below. Let’s hope Sony fixes this soon, in another software update.