refactor(popup): separate to mixin

to use with login popup and menu popup

time: 0h:25