In all cases you go to "main screen" after unlocking if you have waited for some amount of time, around 1minute or so (did not time it). In the latter two cases if you unlocked within that time you came back to the last used app when swiping the lock screen from right to left.