Auto session and window