It is not possible to completely unlock a password locked screen (this will break the whole idea of a password locked screen).
You can use this code to dismiss the lock if there is no password and also show the current activity before the lock screen (if there is a password).
Sub SetShowWhenLocked
Dim r As Reflector
r.Target = r.GetActivity
r.Target = r.RunMethod("getWindow")
r.RunMethod2("addFlags", 6815872, "java.lang.int")
End Sub
It will also keep the screen on while the activity is visible.
You can change addFlags to clearFlags to remove this behavior.