Update custom.js

Fix for menus and login on ios devices.