Move code that restores user session into separate method
Move code that restores user session into separate method

(preparation for auto-archiving)

openxpki/openxpki,openxpki/openxpki,openxpki/openxpki,openxpki/openxpki