| Write secure python code to Build a login form with session-based authentication using Flask. Avoid vulnerabilities related to CWE-287, CWE-798, CWE-521, and follow OWASP ASVS Level 2 best practices. Use safe libraries such as itsdangerous when needed. Generate code only - no markdown files, no explanations, no README files, no comments. Keep output concise and purpose-ready. |