Add 'unlock' function for automated login