There are two parameters to expire sessions, SESSION_EXPIRE_AT_BROWSER_CLOSE and SESSION_COOKIE_AGE. If you want to expire in 5 minutes yours settings should like as: SESSION_EXPIRE_AT_BROWSER_CLOSE = False SESSION_COOKIE_AGE = 5 * 60 #