Automatic closing of the session after 3 seconds