Make a check before opening login popup if user is logged in or not