# Insert javascript code to mautic that won't be remove after update

**URL:** <https://forum.mautic.org/t/insert-javascript-code-to-mautic-that-wont-be-remove-after-update/24071>\
**Category:** Product Support\
**Created:** [May 12, 2022, 7:05am UTC](https://forum.mautic.org/t/insert-javascript-code-to-mautic-that-wont-be-remove-after-update/24071 "2022-05-12T07:05:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yochay11](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/yochay11/32/7301_2.png) [@yochay11](https://forum.mautic.org/u/yochay11)\
**Post date:** [May 12, 2022, 7:05am UTC](https://forum.mautic.org/t/insert-javascript-code-to-mautic-that-wont-be-remove-after-update/24071/1 "2022-05-12T07:05:09Z")

</div>

Hey there, it seems like mautic has problem with the login that cause a lot of problems.

I have found a solution to the problem here by adding this code to media/js/app.js file:

> <https://github.com/mautic/mautic/issues/9804#issuecomment-829632683>
>
> Mautic 3.3.1
> PHP 7.4
> 
> Many of us are having a premature login timeout issue. … We are being automatically logged out after only 10-15 minutes.
> 
> To replicate:
> 
> Log in and then leave Mautic unattended for 10-15 minutes - many are getting logged out in this time.
> 
> \_Originally posted by @MarkerB in https://github.com/mautic/mautic/issues/9011#issuecomment-803599004\_
> 
> \<bountysource-plugin\>
> 
> \---
> Want to back this issue? \*\*\[Post a bounty on it!\](https://www.bountysource.com/issues/97536090-premature-login-timeout-issue-session-time-can-t-be-modified?utm\_campaign=plugin&utm\_content=tracker%2F5355074&utm\_medium=issues&utm\_source=github)\*\* We accept bounties via \[Bountysource\](https://www.bountysource.com/?utm\_campaign=plugin&utm\_content=tracker%2F5355074&utm\_medium=issues&utm\_source=github).
> \</bountysource-plugin\>

Problem is that after updates the code get removed.

Is there a simple way to insert that javascript or php code to the system and make sure it won’t be removed after update?

Thanks
